From a7769752395a5496f198672ad6810b8bb525d304 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 24 Aug 2006 11:41:22 +0000 Subject: All fl_ functions indexed and linked. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/drawing.html | 89 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 8 deletions(-) (limited to 'documentation/drawing.html') diff --git a/documentation/drawing.html b/documentation/drawing.html index 9e3b6e0b0..26e8d7940 100644 --- a/documentation/drawing.html +++ b/documentation/drawing.html @@ -64,6 +64,8 @@ following types of drawing functions:
  • Overlay
  • +
  • Offscreen Drawing
  • +

    Boxes

    @@ -92,6 +94,8 @@ not a multiple of 4 characters in length are undefined.

    The only difference between this function and fl_frame2() is the order of the line segments. +

    See also: fl_frame boxtype. +

    void fl_frame2(const char *s, int x, int y, int w, int h);

    The fl_frame2() function draws a series of line @@ -122,11 +126,11 @@ void fl_push_clip(int x, int y, int w, int h) region onto the stack. The fl_clip() name is deprecated and will be removed from future releases. -

    void fl_push_no_clip()

    +

    void fl_push_no_clip()

    Pushes an empty clip region on the stack so nothing will be clipped. -

    void fl_pop_clip()

    +

    void fl_pop_clip()

    Restore the previous clip region. @@ -143,7 +147,7 @@ will be removed from future releases. -

    int fl_not_clipped(int x, int y, int w, int h)

    +

    int fl_not_clipped(int x, int y, int w, int h)

    Returns non-zero if any of the rectangle intersects the current clip region. If this returns 0 you don't have to draw the object. @@ -159,8 +163,8 @@ region. If this returns 0 you don't have to draw the object. -

    int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, -int &H)

    +

    int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, +int &H)

    Intersect the rectangle x,y,w,h with the current clip region and returns the bounding box of the result in @@ -169,6 +173,13 @@ different than the original. This can be used to limit the necessary drawing to a rectangle. W and H are set to zero if the rectangle is completely outside the region. +

    void fl_clip_region(Fl_Region r) +
    Fl_Region fl_clip_region()

    + +

    Replace the top of the clip stack with a clipping region of any shape. +Fl_Region is an operating system specific type. The second form returns +the current clipping region. +

    Colors

    FLTK manages colors as 32-bit unsigned integers. Values from @@ -378,6 +389,14 @@ function described later in this chapter.

    extend outside the line drawn by fl_arc; to avoid this use w - 1 and h - 1.

    +

    void fl_scroll(int X, int Y, int W, int H, int dx, int dy, +void (*draw_area)(void*, int,int,int,int), void* data)

    + +

    Scroll a rectangle and draw the newly exposed portions. The contents +of the rectangular area is first shifted by dx and +dy pixels. The callback is then called for every newly +exposed rectangular area, +

    Drawing Complex Shapes

    The complex drawing functions let you draw arbitrary shapes @@ -407,6 +426,22 @@ x, float y)

    Concatenate another transformation onto the current one. The rotation angle is in degrees (not radians) and is counter-clockwise. +

    double fl_transform_x(double x, double y) +
    double fl_transform_y(double x, double y) +
    double fl_transform_dx(double x, double y) +
    double fl_transform_dy(double x, double y) +
    void fl_transformed_vertex(double xf, double yf)

    + +

    Transform a coordinate or a distance trough the current transformation matrix. +After transforming a coordinate pair, it can be added to the vertex +list without any forther translations using fl_transformed_vertex. + +

    void fl_begin_points() +
    void fl_end_points()

    + +

    Start and end drawing a list of points. Points are added to +the list with fl_vertex. +

    void fl_begin_line()
    void fl_end_line()

    @@ -417,7 +452,7 @@ angle is in degrees (not radians) and is counter-clockwise.

    Start and end drawing a closed sequence of lines. -

    void fl_begin_polygon() +

    void fl_begin_polygon()
    void fl_end_polygon()

    Start and end drawing a convex filled polygon. @@ -594,8 +629,8 @@ the display. pixels and not "points". Lines should be spaced size pixels apart or more.

    -

    int fl_font() -
    int fl_size()

    +

    int fl_font() +
    int fl_size()

    Returns the face and size set by the most recent call to fl_font(a,b). This can be used to save/restore the @@ -891,5 +926,43 @@ image, and this area is left unchanged.

    Draws the image with the upper-left corner at x,y. This is the same as doing draw(x,y,img->w(),img->h(),0,0). +

    Offscreen Drawing

    + +Sometimes it can be very useful to generate a complex drawing +in memory first and copy it to the screen at a later point in +time. This technique can significantly reduce the amount of +repeated drawing. Fl_Double_Window uses offscreen rendering +to avoid flickering on systems that don't support +double-buffering natively. + +

    Fl_Offscreen fl_create_offscreen(int w, int h)

    + +

    Create an RGB offscreen buffer with w*h pixels. + +

    Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h)

    + +

    Create an RGBA offscreen buffer. Alpha blending is not available +on all platforms. + +

    void fl_delete_offscreen(Fl_Offscreen)

    + +

    Delete a previously created offscreen buffer. All drawings are lost. + +

    void fl_begin_offscreen(Fl_Offscreen)

    + +

    Send all subsequent drawing commands to this offscreen buffer. +FLTK can draw into a buffer at any time. There is no need to wait for +an Fl_Widget::draw() to occur. + +

    void fl_end_offscreen()

    + +

    Quit sending drawing commands to this offscreen buffer. + +

    void fl_copy_offscreen(int x, int y, +int w, int h, Fl_Offscreen osrc, int srcx, int srcy)

    + +

    Copy a rectangular area of the size w*h from srcx, srcy in the offscreen +buffer into the current buffer at x, y. + -- cgit v1.2.3