Module OCX.OCDraw
Library for managing unbuffered draw contexts
Functions
| requestMemory () | Will remove double buffer of any context | 
| redrawContext (ctxn) | Redraw the given draw context. | 
| drawContext (ctxn) | Draw the given draw context. | 
| gpuWrapper (ctxn) | Wrap the given draw context into a GPU driver. | 
| newContext (x, y, width, height[, braille=0[, parent]]) | Create a draw context | 
| isContextOpened (ctxn) | Returns whether the draw context is still opened or not | 
| toOwnedBuffer (ctxn) | Converts the given draw context to a buffer and closes it. | 
| closeContext (ctx) | Close the given draw context | 
| getContextBounds (ctx) | Returns the bounds of the given draw context | 
| moveContext (ctx, x, y) | Move the context to the given position | 
| clipContext (ctx, regions) | Clip the context to the given regions | 
| setBlockingDraw (ctx, blockDraw) | Sets whether or not to block the context's draw, making drawContext a no-op | 
| canvas (ctxn) | Returns a canvas object made associated to the given draw context | 
Functions
- requestMemory ()
- Will remove double buffer of any context
- redrawContext (ctxn)
- 
    Redraw the given draw context.  Using this instead of drawContext allows for many optimisation.
    
    Parameters:- ctxn int The ID of the draw context
 See also:
- drawContext (ctxn)
- 
    Draw the given draw context.
    
    Parameters:- ctxn int The ID of the draw context
 
- gpuWrapper (ctxn)
- 
    Wrap the given draw context into a GPU driver.
    
    Parameters:- ctxn int The ID of the draw context
 
- newContext (x, y, width, height[, braille=0[, parent]])
- 
    Create a draw context
    
    Parameters:- x int The X position of the new draw context
- y int The Y position of the new draw context
- width int The width of the new draw context
- height int The height of the new draw context
- braille int The braille pattern of the new draw context (deprecated) (default 0)
- parent int The ID of the parent of the new draw context (optional)
 Returns:- 
           DrawContext
    
 
- isContextOpened (ctxn)
- 
    Returns whether the draw context is still opened or not
    
    Parameters:- ctxn int The ID of the draw context
 Returns:- 
           boolean
    
 
- toOwnedBuffer (ctxn)
- 
    Converts the given draw context to a buffer and closes it.
 The context must be backed by a buffer!
    
    Parameters:- ctxn int The ID of the draw context
 
- closeContext (ctx)
- 
    Close the given draw context
    
    Parameters:- ctx int The ID of the draw context
 
- getContextBounds (ctx)
- 
    Returns the bounds of the given draw context
    
    Parameters:- ctx int The ID of the draw context
 Returns:- int x
- int y
- int width
- int height
 
- moveContext (ctx, x, y)
- 
    Move the context to the given position
    
    Parameters:- ctx int The ID of the draw context
- x int The new X position
- y int The new Y position
 
- clipContext (ctx, regions)
- 
    Clip the context to the given regions
    
    Parameters:- ctx int The ID of the draw context
- regions region[] A list of regions
 
- setBlockingDraw (ctx, blockDraw)
- 
    Sets whether or not to block the context's draw, making
 drawContext a no-op
    
    Parameters:- ctx int The ID of the draw context
- blockDraw bool Block draw or not
 
- canvas (ctxn)
- 
    Returns a canvas object made associated to the given draw context
    
    Parameters:- ctxn int The ID of the draw context