|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.models.interfaces.GLibUtilities
public final class GLibUtilities
Defines some utilities function for the glib library.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
07/03/2009
Field Summary | |
---|---|
static GLibUtilities |
INSTANCE
The singleton. |
Constructor Summary | |
---|---|
private |
GLibUtilities()
|
Method Summary | |
---|---|
double |
getAltitude(IPoint a,
IPoint b,
IPoint c)
Computes the altitude ha of the right-triangle ABC, right in A. |
double[] |
getBezierCurveMinMax(java.util.List<IPoint> points,
int level)
Defines the min and the max coordinates of the borders of the Bezier curve. |
double |
getCornerGap(IPoint a,
IPoint b,
IPoint c,
double gap)
Given a right-rectangle ABC right in A, it computes the gap created by the corner of the triangle in B based on an initial gap. |
boolean |
isValidCoordinate(double coord)
|
boolean |
isValidPoint(double x,
double y)
|
boolean |
isValidPoint(IPoint pt)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GLibUtilities INSTANCE
Constructor Detail |
---|
private GLibUtilities()
Method Detail |
---|
public boolean isValidPoint(IPoint pt)
pt
- The point to test.
public boolean isValidCoordinate(double coord)
coord
- The value to test.
public boolean isValidPoint(double x, double y)
x
- The X coordinates to test.y
- The Y coordinates to test.
public double getAltitude(IPoint a, IPoint b, IPoint c)
a
- The point A.b
- The point B.c
- The point C.
public double getCornerGap(IPoint a, IPoint b, IPoint c, double gap)
a
- The point A.b
- The point B.c
- The point C.gap
- The initial gap (for example, the thickness, the double border gap,...).
public double[] getBezierCurveMinMax(java.util.List<IPoint> points, int level)
points
- The initial control points.level
- The level of resolution.
[minX, minY, maxX, maxY]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |