Dillo v3.1.1-119-g140d9ebd
|
dw::core::Shape implemtation for polygons. More...
#include <types.hh>
Public Member Functions | |
Polygon () | |
~Polygon () | |
void | draw (core::View *view, core::style::Style *style, int x, int y) |
void | addPoint (int x, int y) |
bool | isPointWithin (int x, int y) |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
Private Member Functions | |
int | zOfVectorProduct (int x1, int y1, int x2, int y2) |
Return the z-coordinate of the vector product of two vectors, whose z-coordinate is 0 (so that x and y of the vector product is 0, too). | |
bool | linesCross0 (int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) |
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the unlimited line, determined by two points (bx1, by1) and (bx2, by2). | |
bool | linesCross (int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) |
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the line, limited by (bx1, by1) and (bx2, by2). | |
Private Attributes | |
lout::misc::SimpleVector< Point > * | points |
int | minx |
int | miny |
int | maxx |
int | maxy |
dw::core::Shape implemtation for polygons.
dw::core::Polygon::Polygon | ( | ) |
void dw::core::Polygon::addPoint | ( | int | x, |
int | y | ||
) |
Definition at line 156 of file types.cc.
References lout::misc::max(), maxx, maxy, lout::misc::min(), minx, miny, and points.
Referenced by Html_tag_content_area(), and main().
|
virtual |
Implements dw::core::Shape.
Definition at line 139 of file types.cc.
References dw::core::style::StyleAttrs::color, dw::core::View::drawPolygon(), points, dw::core::style::Color::SHADING_NORMAL, dw::core::Point::x, and dw::core::Point::y.
|
virtual |
Implements dw::core::Shape.
Definition at line 200 of file types.cc.
References linesCross(), maxx, maxy, minx, miny, and points.
Referenced by main().
|
private |
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the line, limited by (bx1, by1) and (bx2, by2).
Definition at line 189 of file types.cc.
References _MSG, and linesCross0().
Referenced by isPointWithin().
|
private |
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the unlimited line, determined by two points (bx1, by1) and (bx2, by2).
TODO Some more description
Definition at line 173 of file types.cc.
References zOfVectorProduct().
Referenced by linesCross().
|
inlineprivate |
Return the z-coordinate of the vector product of two vectors, whose z-coordinate is 0 (so that x and y of the vector product is 0, too).
Definition at line 115 of file types.hh.
Referenced by linesCross0().
|
private |
Definition at line 108 of file types.hh.
Referenced by addPoint(), isPointWithin(), and Polygon().
|
private |
Definition at line 108 of file types.hh.
Referenced by addPoint(), isPointWithin(), and Polygon().
|
private |
Definition at line 108 of file types.hh.
Referenced by addPoint(), isPointWithin(), and Polygon().
|
private |
Definition at line 108 of file types.hh.
Referenced by addPoint(), isPointWithin(), and Polygon().
|
private |
Definition at line 107 of file types.hh.
Referenced by addPoint(), draw(), isPointWithin(), Polygon(), and ~Polygon().