# dlangui.graphics.gldrawbuf

DLANGUI library.
This module contains opengl based drawing buffer implementation.
To enable OpenGL support, build with version(USE_OPENGL);
Synopsis:

    import dlangui.graphics.gldrawbuf;

License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com

class GLDrawBuf: dlangui.graphics.drawbuf.DrawBuf;
  drawing buffer - image container which allows to perform some drawing operations
  @property Scene scene();
    get current scene (exists only between beforeDrawing() and afterDrawing() calls)
  @property int width();
    returns current width
  @property int height();
    returns current height
  void beforeDrawing();
    reserved for hardware-accelerated drawing - begins drawing batch
  void afterDrawing();
    reserved for hardware-accelerated drawing - ends drawing batch
  void resize(int width, int height);
    resize buffer
  void fill(uint color);
    fill the whole buffer with solid color (no clipping applied)
  void fillRect(Rect rc, uint color);
    fill rectangle with solid color (clipping is applied)
  void drawGlyph(int x, int y, Glyph* glyph, uint color);
    draw 8bit alpha image - usually font glyph using specified color (clipping is applied)
  void drawFragment(int x, int y, DrawBuf src, Rect srcrect);
    draw source buffer rectangle contents to destination buffer
  void drawRescaled(Rect dstrect, DrawBuf src, Rect srcrect);
    draw source buffer rectangle contents to destination buffer rectangle applying rescaling
  void clear();
    cleanup resources
abstract class SceneItem;
  base class for all drawing scene items.
class Scene;
  Drawing scene (operations sheduled for drawing)
  void add(SceneItem item);
    add new scene item to scene
  void draw();
    draws all scene items and removes them from list
  void reset();
    resets scene for new drawing - deletes all items
void onObjectDestroyedCallback(uint pobject);
  object deletion listener callback function type
void onGlyphDestroyedCallback(uint pobject);
  object deletion listener callback function type

Page generated by Ddoc. Vadim Lopatin, 2014