T.R | Title | User | Personal Name | Date | Lines |
---|
5765.1 | | HYDRA::SCHAFER | Mark Schafer, SPE MRO | Mon Feb 03 1997 11:09 | 38 |
|
To: [email protected] ([email protected])
From: [email protected] (Dr. Steve G. Belovich (BV Technologies))
Subject: Re: X-Windows, XLIB draw text
Mark -
Thanks for the reply. I need a solution that uses standard XLIB calls, such
as x$draw_text. I can play with the font data structure and other items but
that's about it. Postscript will not work.
The application is for a real-time plotting/graphing program. It's
object-oriented code which must obey several rules. I use simple XLIB calls
for compatibility and portability. It would be kinda weird to have to
generate a postscipt file and then send it out over the network (it would
also lose performance). There must be some way to handle this!
The option I'm trying to avoid is to "hand manipulate" the characters by
writing a character, changing the x-y coordinates and then writing another
character, etc.
If you find anything, please let me know. Thanks.
Steve
Dr. Steve G. Belovich
Vice President
BV Technologies, Inc.
5310 W. 161st St. Suite H
Brook Park, OH 44142-1610
E-mail: [email protected]
Voice: (216) 267-1881 x211
FAX: (216) 267-1880
Home: (216) 278-2665
|
5765.2 | draw to a pixmap/getpixel/rotate points/drawpoints | CADSYS::CADSYS::LADEROUTE | | Tue Feb 04 1997 09:35 | 12 |
| One method that could be imployed is to do the x$draw_text to a
temporary Pixmap, then do an XGetImage so that you can do XGetPixel for
the image to get all the points. You can store the points in a buffer
and then rotate each point in the buffer. Once this is done you can
then make a call to XDrawPoints().
This was done for a piece of software we have in the CAD group by
Ed Burdick and works rather well.
James Laderoute
Digital Semiconductor
CAD
|
5765.3 | | STAR::KLEINSORGE | Frederick Kleinsorge | Wed Feb 05 1997 09:07 | 25 |
|
Gosh, I use UISX which makes XLIB calls, and which can perform text
rotation, path rotation, scaling, and shearing. I argued loud and long
with the X11 folks during X11R1 Beta that they needed graphics text.
In any case, you either need a graphics text extension to perform the
function (it's amazing that we have scaled fonts, but necer got true
graphics text), or you need to do it at the application level.
The way UISX does it is to draw each character to a pixmap, and read
each pixmap to build a local font structure in the client application
space. For "normal" text it then simply uses the normal X11 text
commands, and for "graphics" text, it uses the character images and the
put image operation. It rotates, shears, etc, the character images on
the fly into a local image buffer, and does the appropriate put image.
The performance isn't too bad once the characters in the font are read
and the font structure created.
An alternative is to use a stroke font, i.e. text is actually a series
of lines that are drawn by the application, the points in the line can
be rotated, and permuted as needed. Of course, again, this is custom
work unless you are using a graphics library like PHIGS or GKS.
|
5765.4 | | GERUND::WOLFE | I'm going to huff, and puff, and blow your house down | Wed Feb 12 1997 23:32 | 17 |
| Display Postscript is another standard way to handle this. It's
not clear from .1 that the customer understood this option. I'm basing
this on:
>It would be kinda weird to have to generate a postscipt file and then send it
>out over the network (it would also lose performance).
One of the biggest drawbacks of any DPS solution is that it to be supported
on the Xserver. That means you can kiss Xterminals goodbye and also
PCs with Xserver software - so it definitely limits your application's
availability. However, if it is available in his environment it's a LOT
easier that a do-it-yourself client side solution. DPS also scales
fonts very nicely (from PS outlines).
Pete
|
5765.5 | font transformations in Alpha VMS v7.1 | DECWIN::STEFANELLI | Great googaly moogaly | Thu Feb 13 1997 09:06 | 25 |
| The X11/R6 server (shipped with v7.1 of Alpha VMS) supports transformations
of the scalable fonts it supports. To find what scalable font are
available use xlsfonts and pass it "*-0-*" as the font name.
The transformation is define by specifying the values for the
transformation matrix you want to use as part of the font name.
You can either replace the pixel size or point size fields. The
syntax would look like:
-bitstream-courier-medium-r-normal--[a b c d]-*-*-*-m-*-iso8859-1
where [a b c d] (brackets are required) are entries in the matrix
a b 0
c d 0
0 0 1
So, passing [50 0 0 50] would give you a 50 pixel high font.
The values can be floating point. They can also be negative, but
you need to use ~ instead of - for the minus sign.
Be careful about sending valid values. The server doesn't seem to
appreciate 0 height fonts.
Doug
|
5765.6 | | HYDRA::SCHAFER | Mark Schafer, SPE MRO | Thu Feb 13 1997 10:32 | 10 |
| I appreciate the discussion. I frankly have not thought much about the
implications of X11/R6 coming to VMS. I think he's happy with the
suggestion from HLO. I agree that he didn't understand what DPS was
when I asked him.
Thanks,
Mark Schafer
SPE MRO
297-3524
|
5765.7 | | HYDRA::SCHAFER | Mark Schafer, SPE MRO | Fri Feb 14 1997 10:18 | 77 |
| Of course, I don't deserve the credit he's giving me. :-) -Mark
From: SMTP%"[email protected]" 14-FEB-1997 10:06:44.95
To: [email protected] (Alpha Developer support)
CC:
Subj: Re: I: X-Windows, XLIB draw text
Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
Fri, 14 Feb 1997 10:06:39 -0500
Received: from multiverse.com by mail13.digital.com (8.7.5/UNX 1.5/1.0/WV)
id JAA26359; Fri, 14 Feb 1997 09:58:17 -0500 (EST)
Received: from .multiverse.com (ts2-170.clv.multiverse.net [207.170.129.170]) by multiverse.com (8.8.5/8.8.5/Gissy/dilbert1.1) with SMTP id JAA20130 for <[email protected]>; Fri, 14 Feb 1997 09:57:25 -0500 (EST)
Date: Fri, 14 Feb 1997 09:57:25 -0500 (EST)
Message-Id: <[email protected]>
X-Sender: [email protected]
X-Mailer: Windows Eudora Version 1.4.4
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email protected] (Alpha Developer support)
From: [email protected] (Dr. Steve G. Belovich (BV Technologies))
Subject: Re: I: X-Windows, XLIB draw text
Hey Mark -
Thanks much for the info on the new X server. Which version of Open VMS
supports this? I have v6.2 and our newer machines have 7.0 (I think - I'll
have to check). If this works, It'll allow bigger text which is always a plus.
Our BVC ToolSet software is becoming very popular because we support all
kinds of serial graphics (RS232) legacy terminals; e.g., ReGIS, Tektronix,
etc. as well as X-Windows and NT workstations. Supporting both
simultaneously and in a completely transparent manner has been a real
challenge. We've got it so that all displays, menus, etc. built on one
terminal appear fine on other terminals and inherit the the capabilities of
the more advanced terminal. This translation is done on-the-fly without any
intervention (or even awareness) on the part of the user. This feature has
allowed us to provide 100% functionality over the phone as well as
hyper-fast display updates over the phone - without "preloading" software
via floppy disk. This has real advantages in remote locations where we have
to support overseas applications. We can do it all from Cleveland Ohio,
courtesy of the phone company. Oh, another thing - we only run on DEC
machines! WE ARE ALMOST CERTAINLY THE ONLY COMPANY THAT DOES THIS
EXCLUSIVELY! PLEASE PASS THE WORD AROUND!
This is the reason why I need more flexibility with regards to text. The
older terminals support arbitrary sized text at arbitrary angles of
rotation. The X standard tried to be too cute using traditional publisher's
font descriptions. Text parsing is rarely efficient and it usually requires
coding gymnastics to insert/delete/edit substrings. X-Y graphs, trends,
SQC/SPC charts, X-bar-R graphs, etc. all need text at 90 degrees and
sometimes 270 degrees. "faking it" via moving the x-y origin of the text is
"do-able" but is a real pain. Oh well...
You've been extremely helpful. Tell your boss you deserve a raise
immediately. If you hear more in this regard, please let me know. Also, if
you hear of business opportunities for us or our system, please let me know.
Give me your "snail mail address" and our sales staff can send you mores
pecific info about what we do. Thanks again for your help!
Regards,
Steve Belovich
Dr. Steve G. Belovich
Vice President
BV Technologies, Inc.
5310 W. 161st St. Suite H
Brook Park, OH 44142-1610
E-mail: [email protected]
Voice: (216) 267-1881 x211
FAX: (216) 267-1880
Home: (216) 278-2665
|