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>
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) |
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.
| void gfxGdkNativeRenderer::Draw | ( | gfxContext * | ctx, | |
| nsIntSize | size, | |||
| PRUint32 | flags, | |||
| GdkColormap * | colormap | |||
| ) |
| 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.
| 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 |
1.7.1