![]() |
![]() |
#1 |
Registered User
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 298
|
InstallClipRegion() (layers.library)
Hi people, here some stange code to clip an area in v33 and higher (kick 1.2)
w is a window (struct Window *) struct Region *region = NULL ; struct Region *oldregion = NULL ; region = NewRegion() ; if (region != NULL) { struct Rectangle rect ; rect.MinX = 10 ; rect.MinY = 10 ; rect.MaxX = 110 ; rect.MaxY = 110 ; if (!OrRectRegion(region, &rect)) { DisposeRegion(region) ; region = NULL ; } } if (region != NULL) { oldregion = InstallClipRegion(w->RPort->Layer, region) ; } SetRast(w->RPort, 0) ; /* clear */ SetAPen(w->RPort, 3) ; Move(w->RPort, 0, 0) ; /* cross */ Draw(w->RPort, 200, 200) ; Move(w->RPort, 200, 0) ; Draw(w->RPort, 0, 200) ; if (region != NULL) { InstallClipRegion(w->RPort->Layer, oldregion) ; DisposeRegion(region) ; region = NULL ; } This code draws a cross in a rectangle (10, 10)-(110, 110) How to do the same in version 31 (Kick1.1) where InstallClipRegion() doesn't exists and OrRegionRect() seems to be bugged ![]() Many Thanks. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MUImaster library | Amigalover122 | project.WHDLoad | 3 | 17 November 2011 19:16 |
implementing multiple layers in gfx software | fishyfish | Coders. General | 1 | 17 October 2010 12:37 |
how many layers on a A600 / A1200 | kipper2k | support.Hardware | 5 | 15 July 2010 00:46 |
lowlevel.library | BippyM | Coders. General | 8 | 09 April 2007 18:08 |
Making a shared library from a gcc .a library | JoJo | Coders. General | 1 | 10 March 2003 19:06 |
|
|