Undo -- undo a graphics operation
Undo(type[, id, level, quiet])
This function undoes the graphics operation specified by type and optionally id. You need to enable layers in order to use this function. Hollywood keeps an internal buffer of all graphics operations it performs, e.g. displaying brush 2. If you want to remove brush 2 now from the display, just call Undo(#BRUSH,2). The following types are possible:

Remove anim specified by id from the display

Remove arc drawn with Arc()

Remove graphics displayed with DisplayBGPicPart()

Remove rectangle drawn with Box()

Remove brush specified by id from the display

Remove graphics displayed with DisplayBrushPart()

Remove circle drawn with Circle()

Remove ellipse drawn with Ellipse()

remove line drawn with Line()

Remove a pixel displayed with Plot()

Remove polygon drawn with Polygon()

Remove text printed with Print() or NPrint()

Remove text object specified by id from the display

Undo the last TextOut() command; id is not required

Undo the last DrawPath() command; id is not required

Remove video specified by id from the display

The optional argument id is only required for types which use an identifier (#ANIM, #BGPICPART, #BRUSH, #BRUSHPART, #TEXTOBJECT, #VIDEO). The other types do not require the id argument. Please set id to 0 for the commands.

The level argument specifies the undo level to use. The argument is optional and defaults to 1. Undo level defines on which level the object to undo is. For example, if you display brush 3 four times on the display and now you want to remove the first one of all brushes 3, you will have to specify a level of 4. To remove the last one you have to set undo level to 1, which is also the default. Therefore if level is not explicitly specified or set to 1, Hollywood will undo the object last displayed of the specified type.

The quiet argument is also optional. If you set it to True, Hollywood will only remove the specified object from it is internal object lists but will leave it on the display. If set to False, Hollywood will also remove it from the screen.

one of the type constants (see list above)
optional: only required for types which require an associated id (defaults to 0)
optional: undo level (defaults to 1)
optional: True if object shall only be removed internally but not from the display (defaults to False)
DisplayBrush(1, #CENTER, #CENTER)
Undo(#BRUSH, 1)
The above code displays brush 1 in the center of the display, waits for a mouse click and then removes it.

Print("Hello ")
Print("This ")
Print("Is ")
Print("An ")
Print("Undo ")
Undo(#PRINT, 0, 6)
Undo(#PRINT, 0, 5)
Undo(#PRINT, 0, 4)
The above code prints "Hello This Is An Undo Test!" on the display, waits for a mouse click and then removes the texts "Hello", "This" and "Is" by using the optional level argument of the Undo() command.

Show TOC