Don't call InvertPixelArray with negative width and/or height.
[tangerine.git] / workbench / libs / muimaster / penspec.h
blob1d5d59d9a574607275a8ce621f88bc64ecae305c
1 /*
2 Copyright 2003, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #ifndef MUI_PENSPEC_H
9 #define MUI_PENSPEC_H
11 #ifndef LIBRARIES_MUI_H
12 #include "mui.h"
13 #endif
15 struct MUI_PenSpec_intern
17 PenSpecType p_type;
18 struct MUI_RenderInfo *p_mri;
19 ULONG p_pen; /* actual graphics pen, only valid between setup/cleanup */
20 BOOL p_is_allocated;
21 union {
22 LONG p_mui;
23 LONG p_cmap;
24 LONG p_sys;
25 struct MUI_RGBcolor p_rgb;
26 } u;
29 #define p_rgb u.p_rgb
30 #define p_mui u.p_mui
31 #define p_cmap u.p_cmap
32 #define p_sys u.p_sys
34 /* From ASCII to internal representation */
35 BOOL zune_pen_spec_to_intern (const struct MUI_PenSpec *spec,
36 struct MUI_PenSpec_intern *intern);
37 BOOL zune_pen_string_to_intern (CONST_STRPTR spec,
38 struct MUI_PenSpec_intern *intern);
39 /* From internal representation to ASCII */
40 BOOL zune_pen_intern_to_spec (const struct MUI_PenSpec_intern *intern,
41 struct MUI_PenSpec *spec);
42 void zune_penspec_fill_muipen(struct MUI_PenSpec_intern *psi, LONG muipen);
43 void zune_penspec_fill_rgb(struct MUI_PenSpec_intern *psi, ULONG r, ULONG g, ULONG b);
45 BOOL zune_penspec_setup(struct MUI_PenSpec_intern *pen, struct MUI_RenderInfo *mri);
46 BOOL zune_penspec_cleanup(struct MUI_PenSpec_intern *pen);
48 void zune_penspec_draw(struct MUI_PenSpec_intern *psi, struct MUI_RenderInfo *mri,
49 LONG left, LONG top, LONG right, LONG bottom);
50 void zune_penspec_drawdirect(struct MUI_PenSpec_intern *psi, struct RastPort *rp, struct MUI_RenderInfo *mri,
51 LONG left, LONG top, LONG right, LONG bottom);
53 #endif /* MUI_PENSPEC_H */