[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2491.0. "Extracting Cursor Information" by CADSE::LOUREIRO (Dr. Spot) Wed Mar 21 1990 17:09

    Hi,
    
    	In the X Reference manual, there is a way to create a cursor based
    	on the font Glyph (XCreateGlyphCursor), and a way to create a
    	cursor based on a pixmap (XCreatePixmapCursor).  Is there any way
    	to get the cursor pixmap information to use the call
    	XCreatePixmapCursor based on cursors in the cursorfont file?
    
    	Why?, you ask.  Well, DEC GKS can now display various cursors based
    	on a bitmap, color, and hot spot information.  It does not know
    	about the cursorfont file, so it gathers the bitmap information and
    	calls XCreatePixmapCursor.  I would like to use Cursor fonts from
    	DECwindows through DEC GKS.  The only connection that I need is to
    	query the cursor font to gather the bitmap and hot spot info.
    	
    	Is there a call or a mechanism to accomplish this?  If not, is
    	there, based on the font structure and the cursor address, a way
    	to get to the cursor information through addressing?
    
    	Thanks in advance for any helpful information.
    
    							- Rob
    						DECview3D Team Member
T.RTitleUserPersonal
Name
DateLines
2491.1HEre's a hackDECWIN::FISHERPrune Juice: A Warrior's Drink!Wed Mar 21 1990 17:329
    No.  Getting information back from the server is not one of X's strong
    points.
    
    Actually, I take that back...here is a hack:  Make a pixmap, use
    PolyText to write the cursor font into the pixmap.  Use GetImage to get
    the bits back.  (Yuk)
    
    Burns
    
2491.2Does PolyText exist?CADSE::LOUREIRODr. SpotThu Mar 22 1990 12:357
    I could not find the routine PolyText in my documentation?  Does this
    routine exist?  Or should I use something like DrawString16?  Also,
    will I be able to recover the Hot X and Hot Y values of the cursor
    with GetImage?
    
    Thanks.
    								- Rob
2491.3yes, but not where you looked.DECWIN::JACKIEJackie FergusonFri Mar 23 1990 11:224
Burns likes to speak protocol.  PolyText{8,16} are the protocol requests
that the DrawString{,16} and DrawText{,16} routines generate.

Jackie
2491.4HotspotDECWIN::FISHERPrune Juice: A Warrior's Drink!Fri Mar 23 1990 15:0114
Sorry, I'm a server freak.  Xlib does not exist to me except as an engine
to feed the voracious mouth of the server.  Toolkit?  What's that? :-)

But aside from that...

The hot spot is defined to be the character origin.  You should be able to
get this out of XLoadQueryFont.  I think what you need to do is look at
leftbearing in XCharStruct to get the X hotspot and ascent in the same structure
to get the Y hotspot (measuring from the top).  The pixmap you want to write
it into must be leftbearing + rightbearing  in width and ascent+decent in
height.  The location you must position to when you do XDraw whateveritis is
(leftbearing,ascent).  (I think).

Burns