NetSurf
|
Plotter operations table. More...
#include <plotters.h>
Data Fields | |
nserror(* | clip )(const struct redraw_context *ctx, const struct rect *clip) |
Sets a clip rectangle for subsequent plot operations. More... | |
nserror(* | arc )(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius, int angle1, int angle2) |
Plots an arc. More... | |
nserror(* | disc )(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius) |
Plots a circle. More... | |
nserror(* | line )(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line) |
Plots a line. More... | |
nserror(* | rectangle )(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle) |
Plots a rectangle. More... | |
nserror(* | polygon )(const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n) |
Plot a polygon. More... | |
nserror(* | path )(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6]) |
Plots a path. More... | |
nserror(* | bitmap )(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags) |
Plot a bitmap. More... | |
nserror(* | text )(const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length) |
Text plotting. More... | |
nserror(* | group_start )(const struct redraw_context *ctx, const char *name) |
Start of a group of objects. More... | |
nserror(* | group_end )(const struct redraw_context *ctx) |
End of the most recently started group. More... | |
nserror(* | flush )(const struct redraw_context *ctx) |
Only used internally by the knockout code. More... | |
bool | option_knockout |
flag to enable knockout rendering. More... | |
Plotter operations table.
Coordinates are from top left of canvas and (0,0) is the top left grid denomination. If a "fill" is drawn from (0,0) to (4,3), the result is:
0 1 2 3 4 5
+-+-+-+-+-+- 0 |#|#|#|#| | +-+-+-+-+-+- 1 |#|#|#|#| | +-+-+-+-+-+- 2 |#|#|#|#| | +-+-+-+-+-+- 3 | | | | | |
Definition at line 102 of file plotters.h.
nserror(* plotter_table::arc) (const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius, int angle1, int angle2) |
Plots an arc.
plot an arc segment around (x,y), anticlockwise from angle1 to angle2. Angles are measured anticlockwise from horizontal, in degrees.
ctx | The current redraw context. |
pstyle | Style controlling the arc plot. |
x | The x coordinate of the arc. |
y | The y coordinate of the arc. |
radius | The radius of the arc. |
angle1 | The start angle of the arc. |
angle2 | The finish angle of the arc. |
Definition at line 131 of file plotters.h.
Referenced by html_redraw_radio(), and knockout_plot_flush().
nserror(* plotter_table::bitmap) (const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags) |
Plot a bitmap.
Tiled plot of a bitmap image. (x,y) gives the top left coordinate of an explicitly placed tile. From this tile the image can repeat in all four directions – up, down, left and right – to the extents given by the current clip rectangle.
The bitmap_flags say whether to tile in the x and y directions. If not tiling in x or y directions, the single image is plotted. The width and height give the dimensions the image is to be scaled to.
ctx | The current redraw context. |
bitmap | The bitmap to plot |
x | The x coordinate to plot the bitmap |
y | The y coordiante to plot the bitmap |
width | The width of area to plot the bitmap into |
height | The height of area to plot the bitmap into |
bg | the background colour to alpha blend into |
flags | the flags controlling the type of plot operation |
Definition at line 257 of file plotters.h.
Referenced by html_redraw_box(), image_bitmap_plot(), knockout_plot_bitmap_recursive(), knockout_plot_flush(), nsbmp_redraw(), nssprite_redraw(), redraw_entry(), rsvg_redraw(), treeview_redraw_search(), treeview_redraw_tree(), and window_redraw_favicon().
nserror(* plotter_table::clip) (const struct redraw_context *ctx, const struct rect *clip) |
Sets a clip rectangle for subsequent plot operations.
ctx | The current redraw context. |
clip | The rectangle to limit all subsequent plot operations within. |
Definition at line 111 of file plotters.h.
Referenced by browser_window_redraw(), content_scaled_redraw(), form_redraw_select_menu(), html_redraw(), html_redraw_background(), html_redraw_box(), html_redraw_inline_background(), knockout_plot_bitmap_recursive(), knockout_plot_flush(), local_history_redraw(), nsgtk_local_history_draw(), page_info_redraw(), plot_init(), plot_set_dimensions(), ro_gui_progress_bar_redraw_window(), text_draw(), text_redraw(), textarea_redraw(), treeview_redraw(), and window_redraw_content().
nserror(* plotter_table::disc) (const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius) |
Plots a circle.
Plot a circle centered on (x,y), which is optionally filled.
ctx | The current redraw context. |
pstyle | Style controlling the circle plot. |
x | The x coordinate of the circle. |
y | The y coordinate of the circle. |
radius | The radius of the circle. |
Definition at line 152 of file plotters.h.
Referenced by html_redraw_radio(), and knockout_plot_flush().
nserror(* plotter_table::flush) (const struct redraw_context *ctx) |
Only used internally by the knockout code.
Must be NULL in any front end display plotters or export plotters.
ctx | The current redraw context. |
Definition at line 317 of file plotters.h.
nserror(* plotter_table::group_end) (const struct redraw_context *ctx) |
End of the most recently started group.
optional, may be NULL
ctx | The current redraw context. |
Definition at line 307 of file plotters.h.
Referenced by html_redraw_box(), knockout_plot_flush(), and knockout_plot_group_end().
nserror(* plotter_table::group_start) (const struct redraw_context *ctx, const char *name) |
Start of a group of objects.
optional, may be NULL. Used when plotter implements export to a vector graphics file format.
ctx | The current redraw context. |
Definition at line 295 of file plotters.h.
Referenced by html_redraw_box(), knockout_plot_flush(), and knockout_plot_group_start().
nserror(* plotter_table::line) (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line) |
Plots a line.
plot a line from (x0,y0) to (x1,y1). Coordinates are at centre of line width/thickness.
ctx | The current redraw context. |
pstyle | Style controlling the line plot. |
line | A rectangle defining the line to be drawn |
Definition at line 170 of file plotters.h.
Referenced by html_redraw_border_plot(), html_redraw_checkbox(), html_redraw_text_decoration_block(), html_redraw_text_decoration_inline(), knockout_plot_flush(), redraw_entry(), scrollbar_rectangle(), and textarea_redraw().
bool plotter_table::option_knockout |
flag to enable knockout rendering.
Optimisation particularly for unaccelerated screen redraw. It tries to avoid plotting to the same area more than once. See desktop/knockout.c
Definition at line 328 of file plotters.h.
Referenced by browser_window_redraw(), content_scaled_redraw(), page_info_redraw(), and treeview_redraw().
nserror(* plotter_table::path) (const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6]) |
Plots a path.
Path plot consisting of cubic Bezier curves. Line and fill colour is controlled by the plot style.
ctx | The current redraw context. |
pstyle | Style controlling the path plot. |
p | elements of path |
n | nunber of elements on path |
transform | A transform to apply to the path. |
Definition at line 226 of file plotters.h.
Referenced by knockout_plot_path(), and svg_redraw_internal().
nserror(* plotter_table::polygon) (const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n) |
Plot a polygon.
Plots a filled polygon with straight lines between points. The lines around the edge of the ploygon are not plotted. The polygon is filled with the non-zero winding rule.
ctx | The current redraw context. |
pstyle | Style controlling the polygon plot. |
p | verticies of polygon |
n | number of verticies. |
Definition at line 207 of file plotters.h.
Referenced by html_redraw_border_plot(), knockout_plot_flush(), knockout_plot_polygon(), and scrollbar_redraw().
nserror(* plotter_table::rectangle) (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle) |
Plots a rectangle.
The rectangle can be filled an outline or both controlled by the plot style The line can be solid, dotted or dashed. Top left corner at (x0,y0) and rectangle has given width and height.
ctx | The current redraw context. |
pstyle | Style controlling the rectangle plot. |
rect | A rectangle defining the line to be drawn |
Definition at line 188 of file plotters.h.
Referenced by amiga_plugin_hack_redraw(), browser_window_redraw(), content_scaled_redraw(), form_redraw_select_menu(), html_redraw(), html_redraw_background(), html_redraw_box(), html_redraw_checkbox(), html_redraw_inline_background(), image_bitmap_plot(), knockout_plot_fill_recursive(), knockout_plot_flush(), knockout_plot_start(), local_history_redraw(), page_info_redraw(), plot_clipped_rectangle(), redraw_entry(), ro_gui_progress_bar_redraw_window(), ro_gui_status_bar_redraw(), scrollbar_redraw(), text_draw(), text_redraw(), textarea_redraw(), textplain_redraw(), treeview_redraw(), treeview_redraw_search(), and treeview_redraw_tree().
nserror(* plotter_table::text) (const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length) |
Text plotting.
ctx | The current redraw context. |
fstyle | plot style for this text |
x | x coordinate |
y | y coordinate |
text | UTF-8 string to plot |
length | length of string, in bytes |
Definition at line 278 of file plotters.h.
Referenced by amiga_plugin_hack_redraw(), fb_redraw_text(), fb_redraw_text_button(), form_redraw_select_menu(), html_redraw_box(), html_redraw_file(), knockout_plot_flush(), page_info__redraw_text_entry(), redraw_entry(), svg_redraw_internal(), text_draw(), text_redraw(), textarea_redraw(), treeview_redraw_search(), and treeview_redraw_tree().