173 bool highlighted =
false;
178 plot_fstyle.
size *= scale;
182 unsigned len = utf8_len + (
space ? 1 : 0);
209 unsigned endtxt_idx = end_idx;
210 bool clip_changed =
false;
211 bool text_visible =
true;
216 if (end_idx > utf8_len) {
219 assert(end_idx == utf8_len + 1);
220 endtxt_idx = utf8_len;
224 utf8_text, start_idx,
231 utf8_text, endtxt_idx,
239 if (end_idx > utf8_len) {
249 if ((start_idx > 0) &&
253 y + (
int)(
height * 0.75 * scale),
271 int px0 =
max(x + startx,
clip->x0);
272 int px1 =
min(x + endx,
clip->x1);
286 text_visible =
false;
299 y + (
int)(
height * 0.75 * scale),
306 if (endtxt_idx < utf8_len) {
307 int px0 =
max(x + endx,
clip->x0);
308 if (px0 < clip->
x1) {
324 y + (
int)(
height * 0.75 * scale),
344 y + (
int) (
height * 0.75 * scale),
538 const css_unit_ctx *unit_len_ctx,
555 length = strlen(
text);
562 if (
width < text_width + 8) {
563 x = x +
width - text_width - 4;
597 struct box *background,
598 const css_unit_ctx *unit_len_ctx,
601 bool repeat_x =
false;
602 bool repeat_y =
false;
603 bool plot_colour =
true;
605 bool clip_to_children =
false;
606 struct box *clip_box =
box;
609 css_fixed hpos = 0, vpos = 0;
610 css_unit hunit = CSS_UNIT_PX, vunit = CSS_UNIT_PX;
616 .fill_colour = *background_colour,
623 plot_content = (background->
background != NULL);
644 switch (css_computed_background_repeat(background->
style)) {
645 case CSS_BACKGROUND_REPEAT_REPEAT:
646 repeat_x = repeat_y =
true;
652 case CSS_BACKGROUND_REPEAT_REPEAT_X:
656 case CSS_BACKGROUND_REPEAT_REPEAT_Y:
660 case CSS_BACKGROUND_REPEAT_NO_REPEAT:
668 css_computed_background_position(background->
style,
669 &hpos, &hunit, &vpos, &vunit);
670 if (hunit == CSS_UNIT_PCT) {
673 scale * FIXTOFLT(hpos) / 100.;
675 x += (int) (FIXTOFLT(css_unit_len2device_px(
676 background->
style, unit_len_ctx,
677 hpos, hunit)) * scale);
680 if (vunit == CSS_UNIT_PCT) {
683 scale * FIXTOFLT(vpos) / 100.;
685 y += (int) (FIXTOFLT(css_unit_len2device_px(
686 background->
style, unit_len_ctx,
687 vpos, vunit)) * scale);
694 css_fixed h = 0, v = 0;
695 css_unit hu = CSS_UNIT_PX, vu = CSS_UNIT_PX;
702 css_computed_border_spacing(
parent->style, &h, &hu, &v, &vu);
704 clip_to_children = (h > 0) || (v > 0);
706 if (clip_to_children)
710 for (; clip_box; clip_box = clip_box->
next) {
712 if (clip_to_children) {
716 r.
x0 = ox + (clip_box->
x * scale);
717 r.
y0 = oy + (clip_box->
y * scale);
730 css_computed_background_color(clip_box->
style, &bgcol);
736 if ((r.
x0 >= r.
x1) ||
745 css_computed_background_color(background->
style, &bgcol);
776 if ((r.
x0 < r.
x1) && (r.
y0 < r.
y1)) {
800 if (!clip_to_children)
827 const css_unit_ctx *unit_len_ctx,
831 bool repeat_x =
false;
832 bool repeat_y =
false;
833 bool plot_colour =
true;
835 css_fixed hpos = 0, vpos = 0;
836 css_unit hunit = CSS_UNIT_PX, vunit = CSS_UNIT_PX;
840 .fill_colour = *background_colour,
851 switch (css_computed_background_repeat(
box->
style)) {
852 case CSS_BACKGROUND_REPEAT_REPEAT:
853 repeat_x = repeat_y =
true;
860 case CSS_BACKGROUND_REPEAT_REPEAT_X:
864 case CSS_BACKGROUND_REPEAT_REPEAT_Y:
868 case CSS_BACKGROUND_REPEAT_NO_REPEAT:
876 css_computed_background_position(
box->
style,
877 &hpos, &hunit, &vpos, &vunit);
878 if (hunit == CSS_UNIT_PCT) {
881 scale) * FIXTOFLT(hpos) / 100.;
883 if (!repeat_x && ((hpos < 2 && !first) ||
884 (hpos > 98 && !last))){
885 plot_content =
false;
888 x += (int) (FIXTOFLT(css_unit_len2device_px(
890 hpos, hunit)) * scale);
893 if (vunit == CSS_UNIT_PCT) {
896 scale) * FIXTOFLT(vpos) / 100.;
898 y += (int) (FIXTOFLT(css_unit_len2device_px(
900 vpos, vunit)) * scale);
905 css_computed_background_color(
box->
style, &bgcol);
936 if ((r.
x0 < r.
x1) && (r.
y0 < r.
y1)) {
1053 scale,
colour, ratio, ctx))
1074 int x_parent,
int y_parent,
float scale,
1077 static const enum css_text_decoration_e decoration[] = {
1078 CSS_TEXT_DECORATION_UNDERLINE, CSS_TEXT_DECORATION_OVERLINE,
1079 CSS_TEXT_DECORATION_LINE_THROUGH };
1080 static const float line_ratio[] = { 0.9, 0.1, 0.5 };
1085 css_computed_color(
box->
style, &col);
1096 if (css_computed_text_decoration(
box->
style) &
1099 x_parent, y_parent, scale,
1100 fgcol, line_ratio[i], ctx))
1104 if (css_computed_text_decoration(
box->
style) &
1110 fgcol, line_ratio[i], ctx))
1134 int x,
int y,
const struct rect *
clip,
float scale,
1135 colour current_background_color,
1142 fstyle.
background = current_background_color;
1163 int x_parent,
int y_parent,
1164 const struct rect *
clip,
float scale,
1165 colour current_background_color,
1183 int x_parent,
int y_parent,
1184 const struct rect *
clip,
float scale,
1185 colour current_background_color,
1198 clip, scale, current_background_color,
1208 clip, scale, current_background_color,
1232 int x_parent,
int y_parent,
1233 const struct rect *
clip,
const float scale,
1234 colour current_background_color,
1240 int padding_left, padding_top, padding_width, padding_height;
1241 int border_left, border_top, border_right, border_bottom;
1244 int x_scrolled, y_scrolled;
1245 struct box *bg_box = NULL;
1246 css_computed_clip_rect css_rect;
1247 enum css_overflow_e overflow_x = CSS_OVERFLOW_VISIBLE;
1248 enum css_overflow_e overflow_y = CSS_OVERFLOW_VISIBLE;
1250 dom_html_element_type tag_type;
1257 overflow_x = css_computed_overflow_x(
box->
style);
1258 overflow_y = css_computed_overflow_y(
box->
style);
1263 x = x_parent +
box->
x;
1264 y = y_parent +
box->
y;
1270 padding_height = padding_top +
box->
height +
1277 x = (x_parent +
box->
x) * scale;
1278 y = (y_parent +
box->
y) * scale;
1298 if (
box->
style && overflow_x != CSS_OVERFLOW_VISIBLE &&
1301 r.
x0 =
x - border_left;
1302 r.
x1 =
x + padding_width + border_right;
1314 int margin_left, margin_right;
1322 r.
x0 =
x - border_left - margin_left < r.
x0 ?
1323 x - border_left - margin_left : r.
x0;
1324 r.
x1 =
x + padding_width + border_right +
1325 margin_right > r.
x1 ?
1326 x + padding_width + border_right +
1327 margin_right : r.
x1;
1332 if (
box->
style && overflow_y != CSS_OVERFLOW_VISIBLE &&
1335 r.
y0 =
y - border_top;
1336 r.
y1 =
y + padding_height + border_bottom;
1348 int margin_top, margin_bottom;
1356 r.
y0 =
y - border_top - margin_top < r.
y0 ?
1357 y - border_top - margin_top : r.
y0;
1358 r.
y1 =
y + padding_height + border_bottom +
1359 margin_bottom > r.
y1 ?
1360 y + padding_height + border_bottom +
1361 margin_bottom : r.
y1;
1390 CSS_VISIBILITY_HIDDEN) {
1395 &r, scale, current_background_color, ctx))
1406 css_computed_position(
box->
style) ==
1407 CSS_POSITION_ABSOLUTE &&
1408 css_computed_clip(
box->
style, &css_rect) ==
1411 if (css_rect.left_auto ==
false)
1412 r.
x0 =
x - border_left + FIXTOINT(css_unit_len2device_px(
1414 css_rect.left, css_rect.lunit));
1416 if (css_rect.top_auto ==
false)
1417 r.
y0 =
y - border_top + FIXTOINT(css_unit_len2device_px(
1419 css_rect.top, css_rect.tunit));
1421 if (css_rect.right_auto ==
false)
1422 r.
x1 =
x - border_left + FIXTOINT(css_unit_len2device_px(
1424 css_rect.right, css_rect.runit));
1426 if (css_rect.bottom_auto ==
false)
1427 r.
y1 =
y - border_top + FIXTOINT(css_unit_len2device_px(
1429 css_rect.bottom, css_rect.bunit));
1481 (bg_box->
gadget != NULL &&
1487 p.
x0 = x - border_left < r.
x0 ? r.
x0 : x - border_left;
1488 p.
y0 = y - border_top < r.
y0 ? r.
y0 : y - border_top;
1489 p.
x1 = x + padding_width + border_right < r.
x1 ?
1490 x + padding_width + border_right : r.
x1;
1491 p.
y1 = y + padding_height + border_bottom < r.
y1 ?
1492 y + padding_height + border_bottom : r.
y1;
1496 int m_left, m_top, m_right, m_bottom;
1508 p.
x0 = p.
x0 - m_left < r.
x0 ? r.
x0 : p.
x0 - m_left;
1509 p.
y0 = p.
y0 - m_top < r.
y0 ? r.
y0 : p.
y0 - m_top;
1510 p.
x1 = p.
x1 + m_right < r.
x1 ? p.
x1 + m_right : r.
x1;
1511 p.
y1 = p.
y1 + m_bottom < r.
y1 ? p.
y1 + m_bottom : r.
y1;
1514 if ((p.
x0 < p.
x1) && (p.
y0 < p.
y1)) {
1517 ¤t_background_color, bg_box,
1536 (border_top || border_right || border_bottom || border_left)) {
1538 padding_width, padding_height, &r,
1546 border_top || border_right ||
1547 border_bottom || border_left)) {
1557 int ib_b_left, ib_b_right;
1559 b.
x0 = x - border_left;
1560 b.
x1 = x + padding_width + border_right;
1561 b.
y0 = y - border_top;
1562 b.
y1 = y + padding_height + border_bottom;
1568 for (ib =
box; ib; ib = ib->
next) {
1576 ib_x = x_parent + ib->
x;
1577 ib_y = y_parent + ib->
y;
1583 ib_x = (x_parent + ib->
x) * scale;
1584 ib_y = (y_parent + ib->
y) * scale;
1595 x, y,
box, scale, &p, b,
1597 ¤t_background_color,
1604 scale, first,
false, ctx))
1607 b.
x0 = ib_x - ib_b_left;
1608 b.
y0 = ib_y - border_top - padding_top;
1609 b.
y1 = ib_y + padding_height - padding_top +
1620 b.
x1 = ib_x + ib_p_width + ib_b_right;
1630 first,
true, ¤t_background_color,
1644 int margin_left, margin_right;
1645 int margin_top, margin_bottom;
1659 rect.
x0 = x + padding_left;
1660 rect.
y0 = y + padding_top;
1669 rect.
x1 = x + padding_width;
1670 rect.
y1 = y + padding_height;
1675 rect.
x0 = x - border_left - margin_left;
1676 rect.
y0 = y - border_top - margin_top;
1677 rect.
x1 = x + padding_width + border_right + margin_right;
1678 rect.
y1 = y + padding_height + border_bottom + margin_bottom;
1686 bool need_clip =
false;
1688 (overflow_x != CSS_OVERFLOW_VISIBLE &&
1689 overflow_y != CSS_OVERFLOW_VISIBLE)) {
1692 r.
x1 = x + padding_width;
1693 r.
y1 = y + padding_height;
1698 if (r.
x1 <= r.
x0 || r.
y1 <= r.
y0) {
1704 }
else if (overflow_x != CSS_OVERFLOW_VISIBLE) {
1707 r.
x1 = x + padding_width;
1717 }
else if (overflow_y != CSS_OVERFLOW_VISIBLE) {
1721 r.
y1 = y + padding_height;
1743 css_computed_text_decoration(
box->
style) != CSS_TEXT_DECORATION_NONE) {
1745 scale, current_background_color, ctx))
1750 exc = dom_html_element_get_tag_type(
box->
node, &tag_type);
1751 if (exc != DOM_NO_ERR) {
1752 tag_type = DOM_HTML_ELEMENT_TYPE__UNKNOWN;
1755 tag_type = DOM_HTML_ELEMENT_TYPE__UNKNOWN;
1764 obj_data.
x = x_scrolled + padding_left;
1765 obj_data.
y = y_scrolled + padding_top;
1781 const char *obj =
"\xef\xbf\xbc";
1783 int obj_x =
x + padding_left;
1802 obj_x +=
width / 2 - obj_width / 2;
1807 obj_x,
y + padding_top + (
int)(
height * 0.75),
1811 }
else if (tag_type == DOM_HTML_ELEMENT_TYPE_CANVAS &&
1816 exc = dom_node_get_user_data(
box->
node,
1817 corestring_dom___ns_key_canvas_node_data,
1819 if (exc != DOM_NO_ERR) {
1831 y + padding_top, &r, ctx);
1854 current_background_color, scale, &r, ctx);
1858 current_background_color, ctx))
1863 scale, current_background_color, ctx))
1879 clip, scale, current_background_color, ctx))
1887 (overflow_x == CSS_OVERFLOW_SCROLL ||
1888 overflow_x == CSS_OVERFLOW_AUTO ||
1889 overflow_y == CSS_OVERFLOW_SCROLL ||
1890 overflow_y == CSS_OVERFLOW_AUTO)) ||
1894 bool has_x_scroll = (overflow_x == CSS_OVERFLOW_SCROLL);
1895 bool has_y_scroll = (overflow_y == CSS_OVERFLOW_SCROLL);
1897 has_x_scroll |= (overflow_x == CSS_OVERFLOW_AUTO) &&
1899 has_y_scroll |= (overflow_y == CSS_OVERFLOW_AUTO) &&
1903 box, has_x_scroll, has_y_scroll);
1920 y_parent +
box->
y,
clip, scale, ctx);
1950 bool select, select_only;
1963 select_only =
false;
1995 data->x + menu_x,
data->y + menu_y,
bool box_hscrollbar_present(const struct box *const box)
Determine if a box has a horizontal scrollbar.
bool box_vscrollbar_present(const struct box *const box)
Determine if a box has a vertical scrollbar.
void box_coords(struct box *box, int *x, int *y)
Find the absolute coordinates of a box.
HTML Box tree inspection interface.
nserror box_handle_scrollbars(struct content *c, struct box *box, bool bottom, bool right)
Applies the given scroll setup to a box.
Box tree manipulation interface.
Browser window creation and manipulation interface.
bool browser_window_redraw(struct browser_window *bw, int x, int y, const struct rect *clip, const struct redraw_context *ctx)
Redraw an area of a window.
Content handling interface.
void font_plot_style_from_css(const css_unit_ctx *unit_len_ctx, const css_computed_style *css, plot_font_style_t *fstyle)
Populate a font style using data from a computed CSS style.
Internal font handling interfaces.
interface to HTML layout.
bool content_get_opaque(hlcache_handle *h)
Determine if a content is opaque from handle.
Protected interface to Content handling.
@ CONTENT_HTML
content is HTML
Useful interned string pointers (interface).
bool html_redraw_printing
int html_redraw_printing_border
int html_redraw_printing_top_cropped
Conception: Generalized output-in-pages.
bool selection_highlighted(const struct selection *s, unsigned start, unsigned end, unsigned *start_idx, unsigned *end_idx)
Tests whether a text range lies partially within the selection, if there is a selection defined,...
Text selection within browser windows (interface).
void textarea_redraw(struct textarea *ta, int x, int y, colour bg, float scale, const struct rect *clip, const struct redraw_context *ctx)
Handle redraw requests for text areas.
Single/Multi-line UTF-8 text area interface.
nserror
Enumeration of error codes.
#define NOF_ELEMENTS(array)
struct netsurf_table * guit
The global interface table.
Interface to core interface table.
Generic bitmap handling interface.
Public content interface.
bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
Display content on screen with optional tiling.
int content_get_height(struct hlcache_handle *h)
Retrieve height of content.
int content_get_width(struct hlcache_handle *h)
Retrieve width of content.
content_type content_get_type(struct hlcache_handle *h)
Retrieve computed type of content.
#define nscss_color_is_transparent(color)
Determine if a CSS color primitive is transparent.
#define nscss_color_to_ns(c)
Convert a CSS color to a NetSurf colour primitive.
Interface to platform-specific layout operation table.
Target independent plotting interface.
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get_errorcode(nserror code)
lookup of a message by errorcode from the standard Messages hash.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
#define colour_to_bw_furthest(c0)
plot_style_t * plot_style_fill_white
plot_style_t const *const plot_style_broken_object
plot_style_t const *const plot_style_margin_edge
plot_style_t const *const plot_style_content_edge
#define blend_colour(c0, c1)
plot_style_t * plot_style_fill_wbasec
plot_style_t * plot_style_stroke_darkwbasec
@ PLOT_OP_TYPE_SOLID
Solid colour.
plot_style_t const *const plot_style_padding_edge
plot_style_t * plot_style_fill_wblobc
#define NS_TRANSPARENT
Transparent colour value.
plot_font_style_t const *const plot_fstyle_broken_object
plot_style_t * plot_style_stroke_lightwbasec
plot_style_t * plot_style_fill_lightwbasec
plot_style_t * plot_style_stroke_wblobc
plot_style_t * plot_style_fill_darkwbasec
Private data for text/html content.
bool html_redraw_borders(struct box *box, int x_parent, int y_parent, int p_width, int p_height, const struct rect *clip, float scale, const struct redraw_context *ctx)
Draw borders for a box.
bool html_redraw_inline_borders(struct box *box, struct rect b, const struct rect *clip, float scale, bool first, bool last, const struct redraw_context *ctx)
Draw an inline's borders.
static bool html_redraw_box_children(const html_content *html, struct box *box, int x_parent, int y_parent, const struct rect *clip, float scale, colour current_background_color, const struct redraw_context *ctx)
Draw the various children of a box.
bool html_redraw_box(const html_content *html, struct box *box, int x_parent, int y_parent, const struct rect *clip, float scale, colour current_background_color, const struct redraw_context *ctx)
Recursively draw a box.
static bool html_redraw_background(int x, int y, struct box *box, float scale, const struct rect *clip, colour *background_colour, struct box *background, const css_unit_ctx *unit_len_ctx, const struct redraw_context *ctx)
Plot background images.
static bool html_redraw_radio(int x, int y, int width, int height, bool selected, const struct redraw_context *ctx)
Plot a radio icon.
bool html_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
Draw a CONTENT_HTML using the current set of plotters (plot).
static bool text_redraw(const char *utf8_text, size_t utf8_len, size_t offset, int space, const plot_font_style_t *fstyle, int x, int y, const struct rect *clip, int height, float scale, bool excluded, struct content *c, const struct selection *sel, const struct redraw_context *ctx)
Redraw a short text string, complete with highlighting (for selection/search)
static bool html_redraw_text_decoration_block(struct box *box, int x, int y, float scale, colour colour, float ratio, const struct redraw_context *ctx)
Plot text decoration for an non-inline box.
static bool html_redraw_box_has_background(struct box *box)
Determine if a box has a background that needs drawing.
static bool html_redraw_file(int x, int y, int width, int height, struct box *box, float scale, colour background_colour, const css_unit_ctx *unit_len_ctx, const struct redraw_context *ctx)
Plot a file upload input.
bool html_redraw_debug
Render padding and margin box outlines in html_redraw().
static bool html_redraw_text_decoration(struct box *box, int x_parent, int y_parent, float scale, colour background_colour, const struct redraw_context *ctx)
Plot text decoration for a box.
static bool html_redraw_text_box(const html_content *html, struct box *box, int x, int y, const struct rect *clip, float scale, colour current_background_color, const struct redraw_context *ctx)
Redraw the text content of a box, possibly partially highlighted because the text has been selected,...
static struct box * html_redraw_find_bg_box(struct box *box)
Find the background box for a box.
static bool html_redraw_text_decoration_inline(struct box *box, int x, int y, float scale, colour colour, float ratio, const struct redraw_context *ctx)
Plot text decoration for an inline box.
static bool html_redraw_checkbox(int x, int y, int width, int height, bool selected, const struct redraw_context *ctx)
Plot a checkbox.
static bool html_redraw_inline_background(int x, int y, struct box *box, float scale, const struct rect *clip, struct rect b, bool first, bool last, colour *background_colour, const css_unit_ctx *unit_len_ctx, const struct redraw_context *ctx)
Plot an inline's background and/or background image.
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
int width
border-width (pixels)
int descendant_y1
bottom edge of descendants
struct box_border border[4]
Border: TOP, RIGHT, BOTTOM, LEFT.
int width
Width of content box (excluding padding etc.).
struct box * parent
Parent box, or NULL.
struct scrollbar * scroll_x
Horizontal scroll.
size_t byte_offset
Byte offset within a textual representation of this content.
struct box * inline_end
INLINE_END box corresponding to this INLINE box, or INLINE box corresponding to this INLINE_END box.
struct box * children
First child box, or NULL.
int height
Height of content box (excluding padding etc.).
struct hlcache_handle * background
Background image for this box, or NULL if none.
struct box * list_marker
List marker box if this is a list-item, or NULL.
int margin[4]
Margin: TOP, RIGHT, BOTTOM, LEFT.
struct box * next_float
Next sibling float box.
struct box * next
Next sibling box, or NULL.
int descendant_x0
left edge of descendants
struct scrollbar * scroll_y
Vertical scroll.
box_type type
Type of box.
struct box * float_children
First float child box, or NULL.
int descendant_x1
right edge of descendants
struct browser_window * iframe
Iframe's browser_window, or NULL if none.
css_computed_style * style
Style for this box.
size_t length
Length of text.
struct hlcache_handle * object
Object in this box (usually an image), or NULL if none.
char * text
Text, or NULL if none.
int padding[4]
Padding: TOP, RIGHT, BOTTOM, LEFT.
int x
Coordinate of left padding edge relative to parent box, or relative to ancestor that contains this bo...
box_flags flags
Box flags.
int space
Width of space after current text (depends on font and size).
struct form_control * gadget
Form control data, or NULL if not a form control.
int descendant_y0
top edge of descendants
struct dom_node * node
DOM node that generated this box or NULL.
int y
Coordinate of top padding edge, relative as for x.
parameters to content redraw
int height
vertical dimension
bool repeat_y
whether content is tiled in y direction
bool repeat_x
whether content is tiled in x direction
int y
coordinate for top-left of redraw
int x
coordinate for top-left of redraw
colour background_colour
The background colour.
int width
dimensions to render content at (for scaling contents with intrinsic dimensions)
float scale
Scale for redraw (for scaling contents without intrinsic dimensions)
Content which corresponds to a single URL.
struct content::@117 textsearch
Free text search state.
struct textsearch_context * context
nserror(* width)(const struct plot_font_style *fstyle, const char *string, size_t length, int *width)
Measure the width of a string.
Data specific to CONTENT_HTML.
struct selection * sel
HTML content's own text selection object.
colour background_colour
Document background colour.
struct form_control * visible_select_menu
Open core-handled form SELECT menu, or NULL if none currently open.
css_unit_ctx unit_len_ctx
CSS length conversion context for document.
struct box * layout
Box tree, or NULL.
struct gui_layout_table * layout
Layout table.
colour foreground
Colour of text.
plot_style_fixed size
Font size, in pt.
colour background
Background colour to blend to, if appropriate.
Plot style for stroke/fill plotters.
colour fill_colour
Colour of fill.
plot_operation_type_t fill_type
Fill plot type.
plot_operation_type_t stroke_type
Stroke plot type.
Plotter operations table.
nserror(* group_start)(const struct redraw_context *ctx, const char *name)
Start of a group of objects.
nserror(* line)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
Plots a line.
nserror(* group_end)(const struct redraw_context *ctx)
End of the most recently started group.
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.
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.
nserror(* rectangle)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle)
Plots a rectangle.
nserror(* clip)(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
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.
nserror(* disc)(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius)
Plots a circle.
bool background_images
Render background images.
const struct plotter_table * plot
Current plot operation table.
bool interactive
Redraw to show interactive features.
bool content_textsearch_ishighlighted(struct textsearch_context *textsearch, unsigned start_offset, unsigned end_offset, unsigned *start_idx, unsigned *end_idx)
Determines whether any portion of the given text box should be selected because it matches the curren...
Interface to HTML searching.
uint32_t colour
Colour type: XBGR.
Option reading and saving interface.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Interface to a number of general purpose functionality.
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.