added a bit more
This commit is contained in:
parent
d156b060a8
commit
79300e12df
1 changed files with 2 additions and 25 deletions
27
pixler.bas
27
pixler.bas
|
|
@ -73,7 +73,7 @@ sub colorpicker
|
|||
end sub
|
||||
|
||||
sub canvas
|
||||
|
||||
line (70,0)-(_width-1,_height-20),_rgb32(64),bf
|
||||
end sub
|
||||
|
||||
function icon(index as long)
|
||||
|
|
@ -160,42 +160,19 @@ function __internaluiicon&(index as long,imagehandle as long,mode as integer)
|
|||
end function
|
||||
|
||||
|
||||
FUNCTION CheckResize (CurrentScreen AS _UNSIGNED LONG)
|
||||
|
||||
' *** Define local variable for temporary screen
|
||||
FUNCTION CheckResize (CurrentScreen AS _UNSIGNED LONG) 'pulled straight out of the wiki'
|
||||
DIM TempScreen AS _UNSIGNED LONG
|
||||
|
||||
CheckResize = 0
|
||||
|
||||
' *** Check to see if the user resized the window. If so, change the SCREEN image to the correct size.
|
||||
IF _RESIZE THEN
|
||||
|
||||
' *** First, create a copy of the current SCREEN image.
|
||||
TempScreen = _COPYIMAGE(CurrentScreen, 32)
|
||||
|
||||
' *** Set the SCREEN to the copied image, releasing the current SCREEN image.
|
||||
SCREEN TempScreen
|
||||
|
||||
' *** Remove (FREE) the original SCREEN image.
|
||||
_FREEIMAGE CurrentScreen
|
||||
|
||||
' *** Create a new "original" SCREEN image.
|
||||
CurrentScreen = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
|
||||
|
||||
' *** Set the SCREEN to the new "original" image, releasing the copied SCREEN image.
|
||||
SCREEN CurrentScreen
|
||||
|
||||
' DRAW PREVIOUS SCREEN ON THE NEW ONE
|
||||
_PUTIMAGE (0, 0), TempScreen, CurrentScreen
|
||||
|
||||
_DISPLAY
|
||||
|
||||
' *** Remove (FREE) the copied SCREEN image.
|
||||
_FREEIMAGE TempScreen
|
||||
|
||||
' *** Tell the caller there was a resize
|
||||
CheckResize = -1
|
||||
|
||||
END IF
|
||||
|
||||
END FUNCTION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue