83#define KNOCKOUT_ENTRIES 3072
84#define KNOCKOUT_BOXES 768
85#define KNOCKOUT_POLYGONS 3072
270 NSLOG(netsurf, INFO,
"Entries are %i/%i, %i/%i, %i/%i",
395 int x0,
int y0,
int x1,
int y1,
401 int nx0, ny0, nx1, ny1;
438 if ((nx0 >= x1) || (nx1 <= x0) || (ny0 >= y1) || (ny1 <= y0))
442 if ((x0 <= nx0) && (x1 >= nx1) && (y0 <= ny0) && (y1 >= ny1)) {
530 int kx0, ky0, kx1, ky1;
647 memcpy(dest, p, n * 2 *
sizeof(
int));
682 const float transform[6])
705 NSLOG(netsurf, INFO,
"bad clip rectangle %i %i %i %i",
863 int kx0, ky0, kx1, ky1;
1025 .option_knockout =
true,
Content handling interface.
nserror
Enumeration of error codes.
@ NSERROR_BAD_SIZE
Bad size.
struct netsurf_table * guit
The global interface table.
Interface to core interface table.
Generic bitmap handling interface.
Target independent plotting interface.
unsigned long bitmap_flags_t
const struct plotter_table knockout_plotters
knockout plotter operation table
static struct knockout_box knockout_boxes[KNOCKOUT_BOXES]
static nserror knockout_plot_arc(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius, int angle1, int angle2)
Plots an arc.
static nserror knockout_plot_disc(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius)
knockout circle plotting
static void knockout_calculate(const struct redraw_context *ctx, int x0, int y0, int x1, int y1, struct knockout_box *owner)
Knockout a section of previous rendering.
static struct rect clip_cur
static int knockout_polygon_cur
static nserror knockout_plot_flush(const struct redraw_context *ctx)
Flush the current knockout session to empty the buffers.
static nserror knockout_plot_path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
knockout path plotting.
static nserror knockout_plot_group_start(const struct redraw_context *ctx, const char *name)
Start of a group of objects.
static int knockout_box_cur
@ KNOCKOUT_PLOT_GROUP_START
@ KNOCKOUT_PLOT_GROUP_END
@ KNOCKOUT_PLOT_RECTANGLE
bool knockout_plot_end(const struct redraw_context *ctx)
End a knockout plotting session.
static nserror knockout_plot_fill_recursive(const struct redraw_context *ctx, struct knockout_box *box, plot_style_t *plot_style)
fill an area recursively
static nserror knockout_plot_group_end(const struct redraw_context *ctx)
End a group of objects.
static nserror knockout_plot_line(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
Knockout line plotting.
static int knockout_polygons[KNOCKOUT_POLYGONS]
static nserror knockout_plot_bitmap_recursive(const struct redraw_context *ctx, struct knockout_box *box, struct knockout_entry *entry)
bitmap plot recusivley
static nserror knockout_plot_text(const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
static nserror knockout_plot_polygon(const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n)
Knockout polygon plotting.
static nserror knockout_plot_rectangle(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rect)
knockout rectangle plotting.
static struct plotter_table real_plot
static int knockout_entry_cur
bool knockout_plot_start(const struct redraw_context *ctx, struct redraw_context *knk_ctx)
Start a knockout plotting session.
static nserror knockout_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
#define KNOCKOUT_POLYGONS
static nserror knockout_plot_bitmap(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
knockout bitmap plotting.
static struct knockout_entry knockout_entries[KNOCKOUT_ENTRIES]
static struct knockout_box * knockout_list
Knockout rendering (interface).
#define NSLOG(catname, level, logmsg, args...)
@ PLOT_OP_TYPE_NONE
No operation.
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
int height
height of bitmap
bool(* get_opaque)(void *bitmap)
Get the opacity of a bitmap.
struct knockout_box * child
struct knockout_box * next
struct knockout_entry::@64::@68 fill
plot_font_style_t font_style
struct knockout_entry::@64::@73 group_start
struct knockout_entry::@64::@71 arc
struct knockout_entry::@64::@66 line
struct knockout_entry::@64::@70 disc
struct knockout_box * box
union knockout_entry::@64 data
struct knockout_entry::@64::@67 polygon
struct knockout_entry::@64::@65 rectangle
struct gui_bitmap_table * bitmap
Bitmap table.
Plot style for stroke/fill plotters.
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(* polygon)(const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n)
Plot a polygon.
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(* path)(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
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.
const struct plotter_table * plot
Current plot operation table.
uint32_t colour
Colour type: XBGR.
struct rect rect
Rectangle coordinates.
Interface to a number of general purpose functionality.
static 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.
static nserror line(const struct redraw_context *ctx, const plot_style_t *style, const struct rect *line)
Plots a line.
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.