NetSurf
|
Redrawing CONTENT_HTML borders implementation. More...
#include <stdbool.h>
#include <stdlib.h>
#include "utils/utils.h"
#include "utils/log.h"
#include "netsurf/plotters.h"
#include "netsurf/css.h"
#include "html/box.h"
#include "html/private.h"
Go to the source code of this file.
Functions | |
static nserror | plot_clipped_rectangle (const struct redraw_context *ctx, const plot_style_t *style, const struct rect *clip, struct rect *rect) |
static nserror | html_redraw_border_plot (const int side, const int *p, colour c, enum css_border_style_e style, int thickness, bool rectangular, const struct rect *clip, const struct redraw_context *ctx) |
Draw one border. More... | |
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. More... | |
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. More... | |
Variables | |
static plot_style_t | plot_style_bdr |
static plot_style_t | plot_style_fillbdr |
static plot_style_t | plot_style_fillbdr_dark |
static plot_style_t | plot_style_fillbdr_light |
static plot_style_t | plot_style_fillbdr_ddark |
static plot_style_t | plot_style_fillbdr_dlight |
Redrawing CONTENT_HTML borders implementation.
Definition in file redraw_border.c.
|
static |
Draw one border.
side | index of border side (TOP, RIGHT, BOTTOM, LEFT) |
p | array of precomputed border vertices |
c | colour for border |
style | border line style |
thickness | border thickness |
rectangular | whether border is rectangular |
clip | cliping area for redrawing border. |
ctx | current redraw context |
Definition at line 93 of file redraw_border.c.
References clip(), darken_colour, double_darken_colour, double_lighten_colour, fallthrough, plot_style_s::fill_colour, LEFT, lighten_colour, plotter_table::line, NS_TRANSPARENT, NSERROR_OK, redraw_context::plot, plot_clipped_rectangle(), PLOT_OP_TYPE_DASH, PLOT_OP_TYPE_DOT, plot_style_bdr, plot_style_fillbdr, plot_style_fillbdr_dark, plot_style_fillbdr_ddark, plot_style_fillbdr_dlight, plot_style_fillbdr_light, PLOT_STYLE_RADIX, plotter_table::polygon, RIGHT, plot_style_s::stroke_colour, plot_style_s::stroke_type, plot_style_s::stroke_width, TOP, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by html_redraw_borders(), and html_redraw_inline_borders().
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.
box | box to draw |
x_parent | coordinate of left padding edge of parent of box |
y_parent | coordinate of top padding edge of parent of box |
p_width | width of padding box |
p_height | height of padding box |
clip | cliping area for redrawing border. |
scale | scale for redraw |
ctx | current redraw context |
Definition at line 444 of file redraw_border.c.
References box::border, BOTTOM, box_border::c, clip(), html_redraw_border_plot(), LEFT, nscss_color_is_transparent, nscss_color_to_ns, NSERROR_OK, RIGHT, box_border::style, box::style, TOP, box_border::width, box::x, and box::y.
Referenced by html_redraw_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.
box | BOX_INLINE which created the border |
b | coordinates of border edge rectangle |
clip | cliping area for redrawing border. |
scale | scale for redraw |
first | true if this is the first rectangle associated with the inline |
last | true if this is the last rectangle associated with the inline |
ctx | current redraw context |
Definition at line 707 of file redraw_border.c.
References box::border, BOTTOM, box_border::c, clip(), html_redraw_border_plot(), LEFT, nscss_color_is_transparent, nscss_color_to_ns, NSERROR_OK, RIGHT, box_border::style, box::style, TOP, box_border::width, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by html_redraw_box().
|
inlinestatic |
Definition at line 58 of file redraw_border.c.
References clip(), NSERROR_OK, redraw_context::plot, plotter_table::rectangle, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 37 of file redraw_border.c.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 40 of file redraw_border.c.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 43 of file redraw_border.c.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 49 of file redraw_border.c.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 52 of file redraw_border.c.
Referenced by html_redraw_border_plot().
|
static |
Definition at line 46 of file redraw_border.c.
Referenced by html_redraw_border_plot().