Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

xymath.cpp File Reference

#include "xymath.h"
#include <stdlib.h>

Include dependency graph for xymath.cpp:

Include dependency graph

Go to the source code of this file.

Functions

int mtDecade (double val)
double mtTolerance (double v)
xybool mtEqual (double v1, double v2)
xybool mtEqual (double v1, double v2, double tol)
xybool mtLessEqual (double v1, double v2, double tol)
xybool mtLessEqual (double v1, double v2)
double mtDistance (double x0, double y0, double x1, double y1)
double mtDistance (int x0, int y0, int x1, int y1)
void mtRotate (double xi, double yi, double angle, double *xr, double *yr)
void mtRotate (int xi, int yi, double angle, int *xr, int *yr)
xybool mtIntercept (double xmin1, double ymin1, double xmax1, double ymax1, double xmin2, double ymin2, double xmax2, double ymax2)
xybool mtIntercept (int xmin1, int ymin1, int xmax1, int ymax1, int xmin2, int ymin2, int xmax2, int ymax2)
xybool mtInclude (double xmin1, double ymin1, double xmax1, double ymax1, double xmin2, double ymin2, double xmax2, double ymax2)
xybool mtInclude (int xmin1, int ymin1, int xmax1, int ymax1, int xmin2, int ymin2, int xmax2, int ymax2)
xybool mtPointInRect (int px, int py, int x1, int y1, int x2, int y2)
xybool mtPointInRect (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInLine (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInLineEx (int px, int py, int x1, int y1, int x2, int y2)
xybool mtPointInLineEx (double px, double py, double x1, double y1, double x2, double y2)
xybool mtPointInMark (int px, int py, int x1, int y1, int tol)
xybool mtPointInsideCircle (int px, int py, int cx, int cy, int radius)
xybool mtPointInCircle (int px, int py, int x0, int y0, int x1, int y1)

Variables

const char * xy_id_xymath_cpp = "$Id: xymath.cpp,v 1.13 2002/01/23 16:10:20 clinio Exp $"
double Tol = 1e-7


Function Documentation

int mtDecade double    val
 

Definition at line 13 of file xymath.cpp.

Referenced by XYLogAxis::draw(), XYGridLog::draw(), and XYLogScaleDecorator::draw().

double mtDistance int    x0,
int    y0,
int    x1,
int    y1
 

Definition at line 57 of file xymath.cpp.

Referenced by XYAxis::adjustSize(), XYAxis::boxArrow(), XYAxis::drawArrow(), mtPointInCircle(), mtPointInLineEx(), mtPointInsideCircle(), XYAngGrid::pointInGrid(), and XYGrid::worldSize2PixelSize().

double mtDistance double    x0,
double    y0,
double    x1,
double    y1
 

Definition at line 51 of file xymath.cpp.

xybool mtEqual double    v1,
double    v2,
double    tol
 

Definition at line 33 of file xymath.cpp.

References xybool.

Referenced by XYLogAxis::boundingBox(), XYLinearAxis::boundingBox(), XYPolarAxis::boundingBox(), XYCartesianAreaMask::boundingBox(), XYCartesianLineMask::boundingBox(), XYLinearAxis::defineMaxPoint(), XYLinearAxis::defineMinPoint(), XYLogAxis::draw(), XYLinearAxis::draw(), XYPolarAxis::draw(), XYGrid::draw(), XYGridLog::draw(), XYGraph::drawMaskArea(), XYAxis::firstTick(), XYPolarAxis::firstTick(), mtLessEqual(), mtPointInCircle(), mtPointInLine(), mtPointInLineEx(), XYGrid::pick(), XYAngGrid::pointInGrid(), and XYLinearAxis::valueInPoint().

xybool mtEqual double    v1,
double    v2
 

Definition at line 27 of file xymath.cpp.

xybool mtInclude int    xmin1,
int    ymin1,
int    xmax1,
int    ymax1,
int    xmin2,
int    ymin2,
int    xmax2,
int    ymax2
 

Definition at line 110 of file xymath.cpp.

References xybool, xyfalse, and xytrue.

Referenced by XYCartesianArea::fence(), XYAxis::fence(), XYLegend::fence(), XYCartesianAreaMask::fence(), XYCartesianBarMask::fence(), XYCartesianLineMask::fence(), XYCartesianMarkMask::fence(), XYCartesianStepMask::fence(), XYCartesianMarker::fence(), XYPolarLineMask::fence(), XYPolarMarkMask::fence(), XYCartesianSlice::fence(), and XYText::fence().

xybool mtInclude double    xmin1,
double    ymin1,
double    xmax1,
double    ymax1,
double    xmin2,
double    ymin2,
double    xmax2,
double    ymax2
 

Definition at line 99 of file xymath.cpp.

xybool mtIntercept int    xmin1,
int    ymin1,
int    xmax1,
int    ymax1,
int    xmin2,
int    ymin2,
int    xmax2,
int    ymax2
 

Definition at line 88 of file xymath.cpp.

References xybool.

Referenced by XYDateScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYStringScaleDecorator::boundingBox(), XYDateScaleDecorator::draw(), XYLogScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), and XYStringScaleDecorator::draw().

xybool mtIntercept double    xmin1,
double    ymin1,
double    xmax1,
double    ymax1,
double    xmin2,
double    ymin2,
double    xmax2,
double    ymax2
 

Definition at line 77 of file xymath.cpp.

xybool mtLessEqual double    v1,
double    v2
 

Definition at line 45 of file xymath.cpp.

References mtEqual(), and xybool.

Referenced by XYGrid::draw(), XYDateScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), and XYAxis::first().

xybool mtLessEqual double    v1,
double    v2,
double    tol
 

Definition at line 39 of file xymath.cpp.

References mtEqual(), and xybool.

xybool mtPointInCircle int    px,
int    py,
int    x0,
int    y0,
int    x1,
int    y1
 

Definition at line 232 of file xymath.cpp.

References mtDistance(), mtEqual(), xybool, xyfalse, and xytrue.

Referenced by XYRadialGrid::pick().

xybool mtPointInLine double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 134 of file xymath.cpp.

References mtEqual(), xybool, and xyfalse.

Referenced by XYCartesianStepMask::pick(), and XYCartesianStepMarkMask::pick().

xybool mtPointInLineEx double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 176 of file xymath.cpp.

References mtDistance(), mtEqual(), xybool, xyfalse, and xytrue.

Referenced by XYCartesianLineMask::pick(), XYCartesianLineMarkMask::pick(), and XYPolarLineMask::pick().

xybool mtPointInLineEx int    px,
int    py,
int    x1,
int    y1,
int    x2,
int    y2
 

Definition at line 143 of file xymath.cpp.

References mtDistance(), mtEqual(), mtPointInsideCircle(), xybool, xyfalse, and xytrue.

xybool mtPointInMark int    px,
int    py,
int    x1,
int    y1,
int    tol
 

Definition at line 205 of file xymath.cpp.

References xybool, xyfalse, and xytrue.

Referenced by XYCartesianLineMarkMask::pick(), and XYCartesianMarkMask::pick().

xybool mtPointInRect double    px,
double    py,
double    x1,
double    y1,
double    x2,
double    y2
 

Definition at line 127 of file xymath.cpp.

References xybool.

Referenced by XYLinearAxis::draw(), XYPolarAxis::draw(), XYCartesianArea::pick(), XYAxis::pick(), XYLegend::pick(), XYCartesianBarMask::pick(), XYCartesianMarker::pick(), XYCartesianSlice::pick(), XYText::pick(), and XYLegend::pickItem().

xybool mtPointInRect int    px,
int    py,
int    x1,
int    y1,
int    x2,
int    y2
 

Definition at line 121 of file xymath.cpp.

xybool mtPointInsideCircle int    px,
int    py,
int    cx,
int    cy,
int    radius
 

Definition at line 221 of file xymath.cpp.

References mtDistance(), xybool, xyfalse, and xytrue.

Referenced by mtPointInLineEx().

void mtRotate int    xi,
int    yi,
double    angle,
int *    xr,
int *    yr
 

Definition at line 70 of file xymath.cpp.

Referenced by XYAxis::adjustSize(), XYGrid::boundingBox(), XYDateScaleDecorator::boundingBox(), XYLogScaleDecorator::boundingBox(), XYNumericalScaleDecorator::boundingBox(), XYStringScaleDecorator::boundingBox(), XYLogAxis::draw(), XYLinearAxis::draw(), XYPolarAxis::draw(), XYGrid::draw(), XYGridLog::draw(), XYDateScaleDecorator::draw(), XYLogScaleDecorator::draw(), XYNumericalScaleDecorator::draw(), XYStringScaleDecorator::draw(), XYAxis::firstTick(), XYPolarAxis::firstTick(), XYGrid::pick(), and XYGrid::worldSize2PixelSize().

void mtRotate double    xi,
double    yi,
double    angle,
double *    xr,
double *    yr
 

Definition at line 63 of file xymath.cpp.

double mtTolerance double    v
 

Definition at line 19 of file xymath.cpp.

References Tol.

Referenced by XYCartesianAreaMask::pick(), XYCartesianLineMask::pick(), XYCartesianLineMarkMask::pick(), XYCartesianStepMask::pick(), XYCartesianStepMarkMask::pick(), XYPolarLineMask::pick(), and XYPolarMarkMask::pick().


Variable Documentation

double Tol = 1e-7 [static]
 

Definition at line 11 of file xymath.cpp.

Referenced by mtEqual(), and mtTolerance().

const char* xy_id_xymath_cpp = "$Id: xymath.cpp,v 1.13 2002/01/23 16:10:20 clinio Exp $"
 

Definition at line 10 of file xymath.cpp.


XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group