NetSurf
plotters.h
Go to the documentation of this file.
1/*
2 * Copyright 2008, 2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef AMIGA_PLOTTERS_H
20#define AMIGA_PLOTTERS_H
21
22#include "netsurf/plotters.h"
23
24struct IBox;
25struct gui_globals;
26
27extern const struct plotter_table amiplot;
28
29void ami_clearclipreg(struct gui_globals *gg);
30void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox);
31void ami_plot_release_pens(struct MinList *shared_pens);
33
34/* Plotter render area management */
35
36/**
37 * Alloc a plotter render area
38 * \param width of render bitmap
39 * \param height of render bitmap
40 * \param force32bit allocate a 32-bit bitmap even if this does not match the screen
41 * \param alloc_pen_list set to false to use own pen list (eg. if multiple pen lists will be required)
42 * \returns pointer to render area
43 */
44struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit, bool alloc_pen_list);
45
46/**
47 * Free a plotter render area
48 * \param gg render area to free
49 */
50void ami_plot_ra_free(struct gui_globals *gg);
51
52/**
53 * Get RastPort associated with a render area
54 * \param gg render area
55 * \returns pointer to render area BitMap
56 */
57struct RastPort *ami_plot_ra_get_rastport(struct gui_globals *gg);
58
59/**
60 * Get a drawing BitMap associated with a render area
61 * \param gg render area
62 * \returns pointer to render area BitMap
63 */
64struct BitMap *ami_plot_ra_get_bitmap(struct gui_globals *gg);
65
66/**
67 * Get size of BitMap associated with a render area
68 * \param gg render area
69 * \param width updated to BitMap width
70 * \param height updated to BitMap height
71 */
72void ami_plot_ra_get_size(struct gui_globals *gg, int *width, int *height);
73
74/**
75 * Set a list of shared pens for a render area to use
76 * Only relevant for palette-mapped screens
77 * \param gg render area
78 * \param pen_list allocated by ami_AllocMinList()
79 */
80void ami_plot_ra_set_pen_list(struct gui_globals *gg, struct MinList *pen_list);
81
82#endif
83
const struct plotter_table amiplot
Definition: plotters.c:1180
bool ami_plot_screen_is_palettemapped(void)
Definition: plotters.c:610
void ami_plot_ra_free(struct gui_globals *gg)
Free a plotter render area.
Definition: plotters.c:258
struct BitMap * ami_plot_ra_get_bitmap(struct gui_globals *gg)
Get a drawing BitMap associated with a render area.
Definition: plotters.c:295
void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox)
Definition: plotters.c:412
struct RastPort * ami_plot_ra_get_rastport(struct gui_globals *gg)
Get RastPort associated with a render area.
Definition: plotters.c:290
void ami_plot_ra_set_pen_list(struct gui_globals *gg, struct MinList *pen_list)
Set a list of shared pens for a render area to use Only relevant for palette-mapped screens.
Definition: plotters.c:306
void ami_plot_ra_get_size(struct gui_globals *gg, int *width, int *height)
Get size of BitMap associated with a render area.
Definition: plotters.c:300
void ami_clearclipreg(struct gui_globals *gg)
Definition: plotters.c:311
struct gui_globals * ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit, bool alloc_pen_list)
Alloc a plotter render area.
Definition: plotters.c:113
void ami_plot_release_pens(struct MinList *shared_pens)
Definition: plotters.c:356
Target independent plotting interface.
int width
Definition: gui.c:160
int height
Definition: gui.c:161
Plotter operations table.
Definition: plotters.h:102