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.
|