/usr/include/IV-2_6/InterViews/painter.h is in ivtools-dev 1.2.11a1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | /*
* Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University
* Copyright (c) 1991 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Stanford and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Stanford and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
/*
* Graphics interface
*/
#ifndef iv2_6_painter_h
#define iv2_6_painter_h
#include <InterViews/enter-scope.h>
#include <InterViews/boolean.h>
#include <InterViews/coord.h>
#include <InterViews/resource.h>
#include <IV-2_6/InterViews/textstyle.h>
#include <IV-2_6/_enter.h>
class Canvas;
class Color;
class PainterRep;
class Pattern;
class Brush;
class Font;
class Transformer;
class Bitmap;
class Raster;
//: graphics rendering interface (iv-2.6)
// <a href=../man3.1/Painter.html>man page</a>
class Painter : public Resource {
public:
Painter();
Painter(Painter*);
~Painter();
void FillBg(boolean);
boolean BgFilled() const;
void SetColors(const Color* f, const Color* b);
const Color* GetFgColor() const;
const Color* GetBgColor() const;
void SetPattern(const Pattern*);
const Pattern* GetPattern() const;
void SetBrush(const Brush*);
const Brush* GetBrush() const;
void SetFont(const Font*);
const Font* GetFont() const;
void SetStyle(int);
int GetStyle() const;
void SetTransformer(Transformer*);
Transformer* GetTransformer() const;
void MoveTo(int x, int y);
void GetPosition(int& x, int& y) const;
void SetOrigin(int x0, int y0);
void GetOrigin(int& x0, int& y0) const;
void Translate(float dx, float dy);
void Scale(float x, float y);
void Rotate(float angle);
virtual void Clip(
Canvas*, Coord left, Coord bottom, Coord right, Coord top
);
virtual void NoClip();
virtual void SetOverwrite(boolean);
virtual void SetPlaneMask(int);
virtual void Text(Canvas*, const char*);
virtual void Text(Canvas*, const char*, int);
virtual void Text(Canvas*, const char*, Coord, Coord);
virtual void Text(Canvas*, const char*, int, Coord, Coord);
virtual void Stencil(
Canvas*, Coord x, Coord y, Bitmap* image, Bitmap* mask = nil
);
#ifdef RasterRect
#undef RasterRect
virtual void RasterRect(Canvas*, Coord x, Coord y, Raster*);
#define RasterRect _lib_iv(RasterRect)
#else
virtual void RasterRect(Canvas*, Coord x, Coord y, Raster*);
#endif /* RasterRect */
#ifdef Point
#undef Point
virtual void Point(Canvas*, Coord x, Coord y);
#define Point _lib_iv(Point)
#else
virtual void Point(Canvas*, Coord x, Coord y);
#endif /* Point */
virtual void MultiPoint(Canvas*, Coord x[], Coord y[], int n);
#ifdef Line
#undef Line
virtual void Line(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2);
#define Line _lib_iv(Line)
#else
virtual void Line(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2);
#endif /* Line */
virtual void Rect(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2);
virtual void FillRect(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2);
virtual void ClearRect(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2);
virtual void Circle(Canvas*, Coord x, Coord y, int r);
virtual void FillCircle(Canvas*, Coord x, Coord y, int r);
#ifdef Ellipse
#undef Ellipse
virtual void Ellipse(Canvas*, Coord x, Coord y, int r1, int r2);
#define Ellipse _lib_iv(Ellipse)
#else
virtual void Ellipse(Canvas*, Coord x, Coord y, int r1, int r2);
#endif /* Ellipse */
virtual void FillEllipse(Canvas*, Coord x, Coord y, int r1, int r2);
#ifdef MultiLine
#undef MultiLine
virtual void MultiLine(Canvas*, Coord x[], Coord y[], int n);
#define MultiLine _lib_iv(MultiLine)
#else
virtual void MultiLine(Canvas*, Coord x[], Coord y[], int n);
#endif /* MultiLine */
#ifdef Polygon
#undef Polygon
virtual void Polygon(Canvas*, Coord x[], Coord y[], int n);
#define Polygon _lib_iv(Polygon)
#else
virtual void Polygon(Canvas*, Coord x[], Coord y[], int n);
#endif /* Polygon */
virtual void FillPolygon(Canvas*, Coord x[], Coord y[], int n);
virtual void BSpline(Canvas*, Coord x[], Coord y[], int n);
#ifdef ClosedBSpline
#undef ClosedBSpline
virtual void ClosedBSpline(Canvas*, Coord x[], Coord y[], int n);
#define ClosedBSpline _lib_iv(ClosedBSpline)
#else
virtual void ClosedBSpline(Canvas*, Coord x[], Coord y[], int n);
#endif /* ClosedBSpline */
virtual void FillBSpline(Canvas*, Coord x[], Coord y[], int n);
virtual void Curve(Canvas*,
Coord x0, Coord y0, Coord x1, Coord y1,
Coord x2, Coord y2, Coord x3, Coord y3
);
virtual void CurveTo(Canvas*,
Coord x0, Coord y0, Coord x1, Coord y1, Coord x2, Coord y2
);
virtual void Copy(
Canvas* src, Coord x1, Coord y1, Coord x2, Coord y2,
Canvas* dst, Coord x0, Coord y0
);
PainterRep* Rep() const;
private:
friend class Rubberband;
const Font* font;
const Color* foreground;
const Color* background;
const Brush* br;
const Pattern* pattern;
int style;
Coord curx, cury;
int xoff, yoff;
Transformer* matrix;
PainterRep* rep;
void Init();
void Copy(Painter*);
void Begin_xor();
void End_xor();
void Map(Canvas*, Coord x, Coord y, Coord& mx, Coord& my);
void Map(Canvas*, Coord x, Coord y, short& sx, short& sy);
void MapList(Canvas*, Coord x[], Coord y[], int n, Coord mx[], Coord my[]);
void MapList(Canvas*, float x[], float y[], int n, Coord mx[], Coord my[]);
void MultiLineNoMap(Canvas* c, Coord x[], Coord y[], int n);
void FillPolygonNoMap(Canvas* c, Coord x[], Coord y[], int n);
};
inline PainterRep* Painter::Rep() const { return rep; }
#include <IV-2_6/_leave.h>
#endif
|