Public Types | Public Member Functions

gfxGdkNativeRenderer Class Reference

This class lets us take code that draws into an GDK drawable and lets us use it to draw into any Thebes context. More...

#include <gfxGdkNativeRenderer.h>

List of all members.

Public Types

enum  { DRAW_IS_OPAQUE, DRAW_SUPPORTS_CLIP_RECT }

Public Member Functions

virtual nsresult DrawWithGDK (GdkDrawable *drawable, gint offsetX, gint offsetY, GdkRectangle *clipRects, PRUint32 numClipRects)=0
 Perform the native drawing.
void Draw (gfxContext *ctx, nsIntSize size, PRUint32 flags, GdkColormap *colormap)

Detailed Description

This class lets us take code that draws into an GDK drawable and lets us use it to draw into any Thebes context.

The user should subclass this class, override DrawWithGDK, and then call Draw(). The drawing will be subjected to all Thebes transformations, clipping etc.


Member Enumeration Documentation

anonymous enum
Enumerator:
DRAW_IS_OPAQUE 
DRAW_SUPPORTS_CLIP_RECT 

Member Function Documentation

void gfxGdkNativeRenderer::Draw ( gfxContext ctx,
nsIntSize  size,
PRUint32  flags,
GdkColormap *  colormap 
)
Parameters:
flags see above
bounds Draw()'s drawing is guaranteed to be restricted to the rectangle (offset.x,offset.y,bounds.width,bounds.height)
dpy a display to use for the drawing if ctx doesn't have one
virtual nsresult gfxGdkNativeRenderer::DrawWithGDK ( GdkDrawable drawable,
gint  offsetX,
gint  offsetY,
GdkRectangle *  clipRects,
PRUint32  numClipRects 
) [pure virtual]

Perform the native drawing.

Parameters:
offsetX draw at this offset into the given drawable
offsetY draw at this offset into the given drawable
clipRects an array of rects; clip to the union
numClipRects the number of rects in the array, or zero if no clipping is required

The documentation for this class was generated from the following file: