Laxkit
0.0.7.1
|
Class with double minx,maxx,miny,maxy. More...
Public Member Functions | |
DoubleBBox () | |
Create empty invalid bbox (maxx<minx and maxy<miny). | |
DoubleBBox (flatpoint p) | |
Create box whose bounds are p. | |
DoubleBBox (double mix, double max, double miy, double may) | |
Create box whose bounds are as given. | |
virtual void | clear () |
Make box invalid: set minx=miny=0 and maxx=maxy=-1. | |
virtual void | addtobounds (double x, double y) |
virtual void | addtobounds (flatpoint p) |
Expand bounds to contain p. Set the bounds to p if current bounds are invalid. | |
virtual void | addtobounds (DoubleBBox *bbox) |
Add the bbox to the bounds. Set the bounds if current bounds are invalid. | |
virtual void | addtobounds (const double *m, DoubleBBox *bbox) |
Add bbox to bounds, first transforming it by 6 element transform matrix m. | |
virtual void | setbounds (DoubleBBox *bbox) |
Just copy over the bounds. | |
virtual void | setbounds (flatpoint *pts, int n) |
Make this bbox be the bounds for the given n points. (does not add to previous bounds) | |
virtual void | setbounds (double mix, double max, double miy, double may) |
Set the bounds to the specified values. | |
virtual int | validbounds () |
Returns maxx>=minx && maxy>=miny. | |
virtual int | intersect (double mix, double max, double miy, double may, int settointersection=0) |
Intersect the given bounds with this's bounds. Return 1 for non-empty intersection. | |
virtual int | intersect (DoubleBBox *bbox, int settointersection=0) |
Just return intersect(bbox.minx,...,settointersection). | |
virtual int | intersect (double *m, DoubleBBox *bbox, int touching, int settointersection) |
Does the transformed box touch. **** incomplete implementation. | |
virtual int | boxcontains (double x, double y) |
Return whether the given point is contained within or on the bounds. | |
virtual flatpoint | BBoxPoint (double x, double y) |
Public Attributes | |
double | minx |
double | maxx |
double | miny |
double | maxy |
Class with double minx,maxx,miny,maxy.
|
virtual |
Return the absolute point given bbox points. That is, point (0,0) is returned as (minx,miny) and (1,1) is returned as (maxx, maxy).
|
virtual |
Return whether the given point is contained within or on the bounds.
Invalid bounds will always return 0.
|
virtual |
Intersect the given bounds with this's bounds. Return 1 for non-empty intersection.
If settointersection!=0, then set current bounds to the intersection or invalid bounds if there is no intersection.
Referenced by Laxkit::DisplayerXlib::imageout(), intersect(), LaxInterfaces::CaptionInterface::Refresh(), and LaxInterfaces::ImageInterface::Refresh().
|
virtual |
Does the transformed box touch. **** incomplete implementation.
If settointersection, then set the bounds of *this to the bounding box of the intersection. If touching
*** this is not well implemented, settointersection not implemented.
*** this needs work so that there is option
References Laxkit::transform_point().