7#ifndef IMAGINE_GRAPHICS_DRAW2D_H
8#define IMAGINE_GRAPHICS_DRAW2D_H
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); }
299 {
fillRect(p.
x(), p.
y(), w, h, col, xorMode); }
375 void setLight(
float dirx,
float diry,
float dirz,
float ambient=0.2f);
378#ifndef DOXYGEN_SHOULD_SKIP_THIS
379 int noRefreshStack(
int i);
const T & y() const
Read alias.
Definition FVector.h:118
const T & x() const
Read alias.
Definition FVector.h:104
A mesh representing a 3D object.
Definition Mesh.h:151
RGB< octet > Color
RGB<octet> alias.
Definition Color.h:283
RGBA< octet > AlphaColor
RGBA<byte> alias.
Definition Color.h:356
DoublePoint3 DoubleVector3
Double space vector.
Definition Types.h:21
void setLight(bool b)
Set/unset lighting in 3D rendering.
void drawPoint(int x, int y, const Color &col, bool xorMode=false)
Point.
void drawPoly(const int x[], const int y[], int n, const Color &col, int width=1, bool xorMode=false)
Draw a polygon.
void drawEllipse(int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false)
Ellipse.
FVector< double, 3 > DoublePoint3
Double space point.
Definition Types.h:19
void fillCircle(int xc, int yc, int r, const AlphaColor &col, bool xorMode=false)
Filled Circle.
FloatPoint3 FloatVector3
Float space vector.
Definition Types.h:25
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 drawCircle(int xc, int yc, int r, const Color &col, int penWidth=1, bool xorMode=false)
Circle.
void noRefreshPop()
Norefresh pop.
Definition Draw.h:413
void noRefreshEnd()
Norefresh end.
void drawRect(int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false)
Rectangle.
void fillRect(int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false)
Filled rectangle.
void fillEllipse(int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false)
Filled Ellipse.
void noRefreshPush()
Norefresh push.
Definition Draw.h:405
void fillPoly(const int x[], const int y[], int n, const AlphaColor &col, bool xorMode=false)
Filled Polygon.
void setCamera(const DoublePoint3 &pos, const DoublePoint3 &dir, const DoubleVector3 &up)
Sets the camera pose.
void noRefreshBegin()
Norefresh begin.
Coords< 2 > IntPoint2
Plane point with integral coordinates.
Definition Types.h:17
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.
void drawLine(int x1, int y1, int x2, int y2, const Color &col, int penWidth=1, bool xorMode=false)
Line.