/usr/include/wx-2.6/wx/ogl/drawnp.h is in wx2.6-headers 2.6.3.2.2-5ubuntu4.
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 199 200 201 202 203 204 205 206 207 208 209 210 211 | /////////////////////////////////////////////////////////////////////////////
// Name: drawnp.h
// Purpose: Private header for wxDrawnShape
// Author: Julian Smart
// Modified by:
// Created: 12/07/98
// RCS-ID: $Id: drawnp.h,v 1.8 2004/06/09 16:42:21 ABX Exp $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _OGL_DRAWNP_H_
#define _OGL_DRAWNP_H_
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "drawnp.h"
#endif
/*
* Drawing operations
*
*/
#define DRAWOP_SET_PEN 1
#define DRAWOP_SET_BRUSH 2
#define DRAWOP_SET_FONT 3
#define DRAWOP_SET_TEXT_COLOUR 4
#define DRAWOP_SET_BK_COLOUR 5
#define DRAWOP_SET_BK_MODE 6
#define DRAWOP_SET_CLIPPING_RECT 7
#define DRAWOP_DESTROY_CLIPPING_RECT 8
/*
#define DRAWOP_CREATE_PEN 10
#define DRAWOP_CREATE_BRUSH 11
#define DRAWOP_CREATE_FONT 12
*/
#define DRAWOP_DRAW_LINE 20
#define DRAWOP_DRAW_POLYLINE 21
#define DRAWOP_DRAW_POLYGON 22
#define DRAWOP_DRAW_RECT 23
#define DRAWOP_DRAW_ROUNDED_RECT 24
#define DRAWOP_DRAW_ELLIPSE 25
#define DRAWOP_DRAW_POINT 26
#define DRAWOP_DRAW_ARC 27
#define DRAWOP_DRAW_TEXT 28
#define DRAWOP_DRAW_SPLINE 29
#define DRAWOP_DRAW_ELLIPTIC_ARC 30
/*
* Base, virtual class
*
*/
class WXDLLIMPEXP_OGL wxDrawOp: public wxObject
{
public:
inline wxDrawOp(int theOp) { m_op = theOp; }
inline ~wxDrawOp() {}
inline virtual void Scale(double WXUNUSED(xScale), double WXUNUSED(yScale)) {};
inline virtual void Translate(double WXUNUSED(x), double WXUNUSED(y)) {};
inline virtual void Rotate(double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(theta), double WXUNUSED(sinTheta), double WXUNUSED(cosTheta)) {};
virtual void Do(wxDC& dc, double xoffset, double yoffset) = 0;
virtual wxDrawOp *Copy(wxPseudoMetaFile *newImage) = 0;
#if wxUSE_PROLOGIO
virtual wxExpr *WriteExpr(wxPseudoMetaFile *image) = 0;
virtual void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) = 0;
#endif
inline int GetOp() const { return m_op; }
// Draw an outline using the current operation. By default, return false (not drawn)
virtual bool OnDrawOutline(wxDC& WXUNUSED(dc), double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h),
double WXUNUSED(oldW), double WXUNUSED(oldH)) { return false; }
// Get the perimeter point using this data
virtual bool GetPerimeterPoint(double WXUNUSED(x1), double WXUNUSED(y1),
double WXUNUSED(x2), double WXUNUSED(y2),
double *WXUNUSED(x3), double *WXUNUSED(y3),
double WXUNUSED(xOffset), double WXUNUSED(yOffset),
int WXUNUSED(attachmentMode))
{ return false; }
protected:
int m_op;
};
/*
* Set font, brush, text colour
*
*/
class WXDLLIMPEXP_OGL wxOpSetGDI: public wxDrawOp
{
public:
wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0);
void Do(wxDC& dc, double xoffset, double yoffset);
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
#if wxUSE_PROLOGIO
wxExpr *WriteExpr(wxPseudoMetaFile *image);
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
#endif
public:
int m_mode;
int m_gdiIndex;
wxPseudoMetaFile* m_image;
unsigned char m_r;
unsigned char m_g;
unsigned char m_b;
};
/*
* Set/destroy clipping
*
*/
class WXDLLIMPEXP_OGL wxOpSetClipping: public wxDrawOp
{
public:
wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2);
void Do(wxDC& dc, double xoffset, double yoffset);
void Scale(double xScale, double yScale);
void Translate(double x, double y);
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
#if wxUSE_PROLOGIO
wxExpr *WriteExpr(wxPseudoMetaFile *image);
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
#endif
public:
double m_x1;
double m_y1;
double m_x2;
double m_y2;
};
/*
* Draw line, rectangle, rounded rectangle, ellipse, point, arc, text
*
*/
class WXDLLIMPEXP_OGL wxOpDraw: public wxDrawOp
{
public:
wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2,
double radius = 0.0, const wxString& s = wxEmptyString);
~wxOpDraw();
void Do(wxDC& dc, double xoffset, double yoffset);
void Scale(double scaleX, double scaleY);
void Translate(double x, double y);
void Rotate(double x, double y, double theta, double sinTheta, double cosTheta);
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
#if wxUSE_PROLOGIO
wxExpr *WriteExpr(wxPseudoMetaFile *image);
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
#endif
public:
double m_x1;
double m_y1;
double m_x2;
double m_y2;
double m_x3;
double m_y3;
double m_radius;
wxString m_textString;
};
/*
* Draw polyline, spline, polygon
*
*/
class WXDLLIMPEXP_OGL wxOpPolyDraw: public wxDrawOp
{
public:
wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints);
~wxOpPolyDraw();
void Do(wxDC& dc, double xoffset, double yoffset);
void Scale(double scaleX, double scaleY);
void Translate(double x, double y);
void Rotate(double x, double y, double theta, double sinTheta, double cosTheta);
wxDrawOp *Copy(wxPseudoMetaFile *newImage);
#if wxUSE_PROLOGIO
wxExpr *WriteExpr(wxPseudoMetaFile *image);
void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr);
#endif
// Draw an outline using the current operation.
virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h,
double oldW, double oldH);
// Get the perimeter point using this data
bool GetPerimeterPoint(double x1, double y1,
double x2, double y2,
double *x3, double *y3,
double xOffset, double yOffset,
int attachmentMode);
public:
wxRealPoint* m_points;
int m_noPoints;
};
#endif
// _OGL_DRAWNP_H_
|