Blitz (74/218)

From:Thilo K�hler
Date:15 Aug 2001 at 01:37:23
Subject:Re: Clipprint

Hello David

It works ! Great.

Thank you,

Thilo

P.S. For everbody whos interessted in this:

DEFTYPE.Rectangle rect

Statement clipprint {win.l,text.s,x.l,y.l,clip_x.l,clip_xs.l}
SHARED rect
*win.Window = Peek.l(Addr Window (win))
*scr.Screen = Peek.l(Addr Screen (0)) ;assumed to use screen 0
SetAPen_ *win\RPort,1 ; gimme a black pen
SetDrMd_ *win\RPort,0 ; a transparent text
rect\MinX = clip_x -WLeftOff
rect\MinY = y -WTopOff
rect\MaxX = clip_x+clip_xs -WLeftOff
rect\MaxY = y+20 -WTopOff ; be sure to give enough y-space for
the fontsize
*new_region.Region = NewRegion_
If *new_region
If OrRectRegion_(*new_region, &rect)
*old_region.Region = InstallClipRegion_(*win\WLayer, *new_region)
Move_ *win\RPort,x,y ; Move graphics cursor to position
Text_ *win\RPort,&text.s,Len(text.s) ; Draw text
*new_region = InstallClipRegion_(*win\WLayer, *old_region)
End If
DisposeRegion_ *new_region
End If
End Statement

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie