7 #ifndef IMAGINE_GRAPHICS_DRAW2D_H 8 #define IMAGINE_GRAPHICS_DRAW2D_H 26 void drawPoint(
int x,
int y,
const Color& col,
bool xorMode =
false);
47 void drawCircle(
int xc,
int yc,
int r,
const Color& col,
int penWidth = 1,
bool xorMode =
false);
70 void drawEllipse(
int x,
int y,
int w,
int h,
const Color &col,
int penWidth = 1,
bool xorMode =
false);
93 void drawLine(
int x1,
int y1,
int x2,
int y2,
const Color &col,
int penWidth = 1,
bool xorMode =
false);
105 {
drawLine(p1.
x(), p1.
y(), p2.
x(), p2.
y(), col, penWidth, xorMode); }
116 void drawRect(
int x,
int y,
int w,
int h,
const Color &col,
int penWidth = 1,
bool xorMode =
false);
128 {
drawRect(p.
x(), p.
y(), w, h, col, penWidth, xorMode); }
141 void drawPoly(
const int x[],
const int y[],
int n,
const Color& col,
int width = 1,
bool xorMode =
false);
165 inline void drawPoly(
const int xy[],
int n,
const Color &col,
int width = 1,
bool xorMode =
false)
181 double alpha = 0,
bool italic =
false,
bool bold =
false,
bool underlined =
false,
bool xorMode =
false);
196 double alpha = 0,
bool italic =
false,
bool bold =
false,
bool underlined =
false,
bool xorMode =
false)
197 {
drawString(p.
x(), p.
y(), s, col, fontSize, alpha, italic, bold, underlined, xorMode); }
210 void drawArrow(
int x1,
int y1,
int x2,
int y2,
const AlphaColor &col,
int arrowWidth = 8,
int arrowHeight = 5,
211 int style = 0,
int width = 1,
bool xorMode =
false);
225 int style = 0,
int width = 1,
bool xorMode =
false)
226 {
drawArrow(p1.
x(), p1.
y(), p2.
x(), p2.
y(), col, arrowWidth, arrowHeight,
227 style, width, xorMode); }
240 inline void drawArrow(
int x1,
int y1,
int x2,
int y2,
const AlphaColor& col,
double ta,
double tl,
int style = 0,
int width = 1,
bool xorMode =
false)
242 int(tl*cos(ta*3.14/180)),
int(2*tl*sin(ta*3.14/180)),
243 style, width, xorMode); }
257 {
drawArrow(p1.
x(), p1.
y(), p2.
x(), p2.
y(), col, ta, tl, style, width, xorMode); }
288 void fillRect(
int x,
int y,
int w,
int h,
const AlphaColor &col,
bool xorMode =
false);
299 {
fillRect(p.
x(), p.
y(), w, h, col, xorMode); }
332 void fillPoly(
const int x[],
const int y[],
int n,
const AlphaColor &col,
bool xorMode =
false);
375 void setLight(
float dirx,
float diry,
float dirz,
float ambient=0.2f);
378 #ifndef DOXYGEN_SHOULD_SKIP_THIS 379 int noRefreshStack(
int i);
419 #endif // IMAGINE_GRAPHICS_DRAW2D_H void drawPoint(int x, int y, const Color &col, bool xorMode=false)
Point.
Vector of fixed size.
Definition: FVector.h:17
void drawLine(int x1, int y1, int x2, int y2, const Color &col, int penWidth=1, bool xorMode=false)
Line.
void noRefreshPush()
Norefresh push.
Definition: Draw.h:405
RGB< byte > Color
RGB<byte> alias.
Definition: Color.h:281
void noRefreshBegin()
Norefresh begin.
void drawPoly(const int x[], const int y[], int n, const Color &col, int width=1, bool xorMode=false)
Draw a polygon.
void setLight(bool b)
Set/unset lighting in 3D rendering.
const T & x() const
Read alias.
Definition: FVector.h:104
void fillPoly(const int x[], const int y[], int n, const AlphaColor &col, bool xorMode=false)
Filled Polygon.
void fillRect(int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false)
Filled rectangle.
RED GREEN BLUE Alpha color.
Definition: Color.h:138
void drawEllipse(int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false)
Ellipse.
void fillCircle(int xc, int yc, int r, const AlphaColor &col, bool xorMode=false)
Filled Circle.
void drawString(int x, int y, const std::string &s, const AlphaColor &col, int fontSize=12, double alpha=0, bool italic=false, bool bold=false, bool underlined=false, bool xorMode=false)
String.
void setCamera(const DoublePoint3 &pos, const DoublePoint3 &dir, const DoubleVector3 &up)
Sets the camera pose.
const T & y() const
Read alias.
Definition: FVector.h:118
Imagine++ namespace.
Definition: Array.h:7
void drawArrow(int x1, int y1, int x2, int y2, const AlphaColor &col, int arrowWidth=8, int arrowHeight=5, int style=0, int width=1, bool xorMode=false)
Arrow.
RED GREEN BLUE color.
Definition: Color.h:26
void noRefreshEnd()
Norefresh end.
void noRefreshPop()
Norefresh pop.
Definition: Draw.h:413
void fillEllipse(int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false)
Filled Ellipse.
void drawRect(int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false)
Rectangle.
void drawCircle(int xc, int yc, int r, const Color &col, int penWidth=1, bool xorMode=false)
Circle.