comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDLgrWindow vs. IDLgrBuffer, font-rendering difference
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDLgrWindow vs. IDLgrBuffer, font-rendering difference [message #68906] Fri, 27 November 2009 17:47
M. Katz is currently offline  M. Katz
Messages: 69
Registered: May 2005
Member
Has anyone noticed or found a solution for the peculiar font-size
inconsistency between IDLgrWindow and IDLgrBuffer that occurs with
RECOMPUTE_DIMENSIONS=2? When I draw an IDLgrAxis to the window or to
the buffer, the font-size in the buffer is smaller by about 1.33x.

The only way to guarantee consistency between Window and Buffer is to
set RECOMPUTE_DIMENSIONS=0, but then I cannot stretch the axes without
distorting the fonts or re-drawing them entirely.

Here's a little test program to show you what I mean.

k = 1
sz = [300,100]*k
oWindow = obj_new('IDLgrWindow', dimensions=sz)
oBuffer = obj_new('IDLgrBuffer', dimensions=sz)
oView = obj_new('IDLgrView',EYE=200, projection=1, zclip=[100,-100],
COLOR=[255,255,255])

oFont = obj_new('IDlgrFont', 'Times', SIZE=12.*k)
oAxis = obj_new('IDLgrAxis', 0, LOCATION=[0,0,0], RANGE=[0,10])

oAxis -> GetProperty, TICKTEXT=oText ;-- retrieve text object, a la
Fanning
oText -> SetProperty, FONT=oFont, RECOMPUTE_DIMENSIONS=2 ;--- Change
this value

oModel = obj_new('IDLgrModel')
oModel -> Add, oAxis

oView -> Add, oModel
oView -> SetProperty, VIEWPLANE_RECT = [-1,-3,12,6]

oWindow -> Draw, oView
oImage1 = oWindow -> Read()
oImage1 -> GetProperty, DATA=img_w

oBuffer -> Draw, oView
oImage2 = oBuffer -> Read()
oImage2 -> GetProperty, DATA=img_b

window, XSIZE=sz[0]*2+2, YSIZE=sz[1] ;--- display images in direct
graphics
tvscl, img_w, /true ;--- render the window image on the
left
tvscl, img_b, sz[0]+2, 0, /true ;--- render the buffer image on the
right
obj_destroy, [oWindow, oBuffer, oAxis, oFont, oText, oModel, oView, $
oImage1, oImage2]

end

Any suggestions? Thank you!
-M.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: The Sky is Falling! (SMOOTH() edition)
Next Topic: Re: Larger arrays or more dimensions?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:56:08 PDT 2025

Total time taken to generate the page: 0.01193 seconds