is it possible, a UNDO only for the last action on imagepainting ?
I can use oImg:Refresh(), but it clears the image and all paintings I have done before, are deleted as well.
All positions are defined with mouseclick top / left and bottom / right and calculated in relation to the original image-size.
I created this tool because doing all this with a commercial tool, many steps are needed and some options are not possible.
A solution would make it perfect.
NOTES : I ordered a extra NEW homepage. There I will place all tools and tips for download.
The drawing-options are called inside the function :
DRAWIMG( oDrawImg, hDC )
( The different values are define as STATIC )
Possible paintings on a image :
with any pensize and color :
Freehand
Line
Box
Fill
with selected font and color :
Date + Time stamp
Date stamp
Time stamp
using a resize-factor on :
Image-Logo
Transparent Logo ( with selected transparent-level )
Signature ( can be created inside the EXTRA-dialog)

Maybe SAVING and RESTORING the last painting ?
Code: Select all | Expand
// -----------------STATIC FUNCTION DRAWIMG( oDrawImg, hDC )LOCAL nWidth := oDrawImg:nWidth()LOCAL nHeight := oDrawImg:nHeight()LOCAL hMemBmp, hBmpOldLOCAL hBitmap := oDrawImg:hBitmapLOCAL hPalette := oDrawImg:hPalettehMemDC := CREATECOMPATIBLEDC( hDC )hMemBmp := CREATECOMPATIBLEBITMAP( hDC, nWidth, nHeight )hBmpOld := SELECTOBJECT( hMemDC, hMemBmp )PALBMPDRAW( hMemDC, 0, 0, hBitmap, hPalette, nWidth, nHeight )// ------ STYLES -----------IF cDrawStyle = "Freehand" DRAWPOINTS( hMemDC ) ENDIFIF cDrawStyle = "Lines" CLICK_LINES( hMemDC )ENDIFIF cDrawStyle = "Box" CLICK_BOX( hMemDC )ENDIFIF cDrawStyle = "Fill" CLICK_FILL( hMemDC )ENDIFIF cDrawStyle = "Date + Time" CLICK_DT( hMemDC )ENDIFIF cDrawStyle = "Date" CLICK_DATE( hMemDC )ENDIFIF cDrawStyle = "Time" CLICK_TIME( hMemDC )ENDIFIF cDrawStyle = "Image-Logo" DRAW_IMAGE( hMemDC )ENDIFIF cDrawStyle = "Transp.Logo" DRAW_LOGO( hMemDC )ENDIF// -----------------SELECTOBJECT( hMemDC, hBmpOld )DELETEDC( hMemDC )oDrawImg:hBitmap = hMemBmpPALBMPFREE( hBitmap, hPalette )PALBMPNEW( oDrawImg:hWnd, oDrawImg:hBitmap, oDrawImg:hPalette )oDrawImg:Refresh()RETURN NIL
Inside EXTRAS : define dialog-background, signature, date/timestamp-font and a resize-factor of a saved image

Best regards
Uwe
