Grx.Context.clear

@accepts(Grx.Context, Grx.Color)
@returns(none)
def clear(self, bg):
    # Python wrapper for grx_context_clear()
  

Clears the specified context using the specified background color.

Thanks to the special Grx.Color definition, you can do more than simple clear with this functions, by example with: |[<!-- language="C" --> grx_context_clear (ctx, grx_color_to_xor_mode (GRX_COLOR_WHITE)); ]| the context is negativized, do it again and the context is restored.

Also see Grx.clear_context for clearing the current context and Grx.clear_screen for clearing the screen.

self

the context

bg

the background color