|
double | X [get, set] |
|
double | Y [get, set] |
|
double | W [get, set] |
|
double | H [get, set] |
|
◆ RectangleD()
BioGTK.RectangleD.RectangleD |
( |
double |
X, |
|
|
double |
Y, |
|
|
double |
W, |
|
|
double |
H |
|
) |
| |
|
inline |
320 {
325 }
double W
Definition Bio.cs:316
double X
Definition Bio.cs:314
double Y
Definition Bio.cs:315
double H
Definition Bio.cs:317
◆ IntersectsWith() [1/3]
bool BioGTK.RectangleD.IntersectsWith |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
If the point is within the rectangle, return true. Otherwise, return false
- Parameters
-
x | The x coordinate of the point to check |
y | The y coordinate of the point to test. |
- Returns
- A boolean value.
361 {
362 if (
X <= x && (
X +
W) >= x &&
Y <= y && (
Y +
H) >= y)
363 return true;
364 else
365 return false;
366 }
◆ IntersectsWith() [2/3]
bool BioGTK.RectangleD.IntersectsWith |
( |
PointD |
p | ) |
|
|
inline |
Returns true if the point is inside the rectangle
- Parameters
-
- Returns
- The return value is a boolean value.
351 {
353 }
bool IntersectsWith(RectangleD rect1)
Definition Bio.cs:336
◆ IntersectsWith() [3/3]
bool BioGTK.RectangleD.IntersectsWith |
( |
RectangleD |
rect1 | ) |
|
|
inline |
If any of the four corners of the rectangle are inside the polygon, then the rectangle intersects with the polygon
- Parameters
-
RectangleD | The rectangle that is being checked for intersection. |
- Returns
- a boolean value.
337 {
338 if (rect1.X + rect1.W <
X ||
X +
W < rect1.X ||
339 rect1.Y + rect1.H <
Y ||
Y +
H < rect1.Y)
340 {
341 return false;
342 }
343 return true;
344 }
◆ ToRectangleF()
RectangleF BioGTK.RectangleD.ToRectangleF |
( |
| ) |
|
|
inline |
It converts a RectangleD to a RectangleF
- Returns
- A RectangleF object.
371 {
372 return new RectangleF((
float)
X, (
float)
Y, (
float)
W, (
float)
H);
373 }
◆ ToRectangleInt()
Rectangle BioGTK.RectangleD.ToRectangleInt |
( |
| ) |
|
|
inline |
327 {
329 }
AForge.Rectangle Rectangle
Definition ImageView.cs:14
◆ ToString()
override string BioGTK.RectangleD.ToString |
( |
| ) |
|
|
inline |
This function returns a string that contains the values of the X, Y, W, and H properties of the object
- Returns
- The X, Y, W, and H values of the rectangle.
379 {
380 double w = Math.Round(
W, 2, MidpointRounding.ToZero);
381 double h = Math.Round(
H, 2, MidpointRounding.ToZero);
382 double x = Math.Round(
X, 2, MidpointRounding.ToZero);
383 double y = Math.Round(
Y, 2, MidpointRounding.ToZero);
384 return x + ", " + y + ", " + w + ", " + h;
385 }
double BioGTK.RectangleD.H |
|
getset |
317{ get { return h; } set { h = value; } }
double BioGTK.RectangleD.W |
|
getset |
316{ get { return w; } set { w = value; } }
double BioGTK.RectangleD.X |
|
getset |
314{ get { return x; } set { x = value; } }
double BioGTK.RectangleD.Y |
|
getset |
315{ get { return y; } set { y = value; } }
The documentation for this struct was generated from the following file:
- D:/Kari/repos/BioGTK/Source/Bio.cs