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

Home » Public Forums » archive » Object Graphics Vector Output
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Object Graphics Vector Output [message #41099 is a reply to message #40858] Fri, 01 October 2004 15:28 Go to previous messageGo to previous message
Randall  Skelton is currently offline  Randall Skelton
Messages: 31
Registered: October 2004
Member
Thanks for the reply Karl. Here is another one for you... Any ideas
why models containing vector (aka hershey) text have unsightly boxes
around them when using vector postscript output?

Cheers,
Randall

-- cut --

; ============================================================ ==
; Create the plot canvas (roughly one letter sized sheet of paper)

CanvasDim = [19,24.5]
oCanvasView = obj_new('IDLgrView', UNITS=2, DIMENSION=CanvasDim, $
VIEWPLANE_RECT=[0,0,1,1])

; ============================================================ ==
; Add some vector text
Text1Dim = [CanvasDim[0], 0.75] ; cm
Text1Loc = [0, 10] ; cm

oSmFont1 = obj_new('IDLgrFont', 'Hershey', SIZE=6)

oVer = obj_new('IDLgrText', !version.release, LOCATION=[0.9,0.0], $
FONT=oSmFont1, ALIGN=1)
date = string(systime(/julian), format="(C(CYI4, '-', CMoI2.2, '-', " +
$
"CDI2.2, X, CHI2.2, ':',CMI2.2, ':', CSF07.4))")
oDate = obj_new('IDLgrText', date, LOCATION=[0.1,0.0], $
FONT=oSmFont1, ALIGN=0)

oText1Model = obj_new('IDLgrModel', NAME='Text1')
oText1Model -> add, oVer
oText1Model -> add, oDate

oText1View = obj_new('IDLgrView', UNITS=2, DIMENSION=Text1Dim, $
LOCATION=Text1Loc, /TRANSPARENT, VIEWPLANE_RECT=[0,0,1,1])
oText1View -> add, oText1Model

; ============================================================ ==
; Add some true-type text
Text2Dim = [CanvasDim[0], 0.75] ; cm
Text2Loc = [0, 12] ; cm

oSmFont2 = obj_new('IDLgrFont', 'Times', SIZE=10)

oVer = obj_new('IDLgrText', !version.release, LOCATION=[0.9,0.0], $
FONT=oSmFont2, ALIGN=1)
date = string(systime(/julian), format="(C(CYI4, '-', CMoI2.2, '-', " +
$
"CDI2.2, X, CHI2.2, ':',CMI2.2, ':', CSF07.4))")
oDate = obj_new('IDLgrText', date, LOCATION=[0.1,0.0], $
FONT=oSmFont2, ALIGN=0)

oText2Model = obj_new('IDLgrModel', NAME='Text2')
oText2Model -> add, oVer
oText2Model -> add, oDate

oText2View = obj_new('IDLgrView', UNITS=2, DIMENSION=Text2Dim, $
LOCATION=Text2Loc, /TRANSPARENT, VIEWPLANE_RECT=[0,0,1,1])
oText2View -> add, oText2Model

; ============================================================ ==
; Group the objects
ogroup = obj_new('IDLgrViewgroup')
ogroup -> Add, oCanvasView
ogroup -> Add, oText1View
ogroup -> Add, oText2View

owin = obj_new('IDLgrWindow', GRAPHICS_TREE=ogroup, UNITS=2, $
DIMENSIONS=CanvasDim)
owin -> draw

oclip = obj_new('IDLgrClipboard', GRAPHICS_TREE=ogroup, UNITS=2, $
DIMENSIONS=CanvasDim, RESOLUTION=[0.03,0.03])
oclip -> draw, FILENAME='test_vector.eps', /VECTOR, /POSTSCRIPT
oclip -> draw, FILENAME='test_bitmap.eps', /POSTSCRIPT

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PV-wave into VMS?
Next Topic: Re: writing to a specific directory

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

Current Time: Fri Oct 10 00:05:44 PDT 2025

Total time taken to generate the page: 2.23616 seconds