Takze zmeny:
RAVEElement.java
protected String colorName = null;
/** Sirka obrysove cary nebo "tloustka" bodu. Pokud je <= 0, bere se jako 1. */
protected int lineWidth = 0;
/** Jmeno vyplnova barvy. Pokud je null, pak bez vyplne. */
protected String fillColorName = null;
/** Jmeno stylu obrysove cary. Zacina si kde chce, jak chce. Pokud null, pak plna cara. */
protected String lineStyleName = null;
/** Vysledna transformace. Tato se pouzije pro kresleni a pro ukladani na disk. */
protected RAVETransform finalTransform = null;
/** Zasobnik transformaci. Pouziva se jen pro editaci. */
protected Vector allTransforms = null;
public void appendTransform( RAVETransform t ) { ... }
protected String strafeLineStyle = null;
protected int strafeLineWidth = 0;
protected double strafeAngle = 0;
protected String strafeColor = null;
protected int strafeGap = null;
Pro ucely ukladani a zobrazovani se pouziva finalTransform, pri nacitani se nactena tranformace vlozi pomoci funkce appendTransform.
RAVETransform
public class RAVETransform
{
....
public static RAVETransform getTranslate( double x, double y );
public static RAVETransform getTranslate( RAVEVertex v1, RAVEVertex v2 );
public static RAVETransform getRotate( RAVEVertex center, double angle );
public static RAVETransform getScale( RAVEVertex center, double ratio );
public static RAVETransform getMirror( RAVEVertex center );
public static RAVETransform getMirror( RAVEVertex v1, RAVEVertex v2 );
public static RAVETransform getGeneral( double [] v );
public double getMatrixValue( int x, int y );
public java.awt.geom.AffineTransform getTransform();
public RAVEVertex getTransformedVertex( RAVEVertex v );
public RAVEVertex getInverseTransformedVertex( RAVEVertex v );
}
Pro ukladani je zajimava funkce getMatrixValue, pro nacitani pak getGeneral, ktera jako parametr bere pole 9 hodnot.
RAVERender
Pro zmenu meritka pribyl do obou hlavnich funkci parametr zoom (typu double), ktery rika zvetseni/zmenseni. Dale je tam u vykreslovani navit parametr typu RAVETransform, ktery rika ktera transformace je vybrana. Jeji vykresleni radeji udelam sam, ted jeste nevim co vsechno kolem toho bude potreba.
RAVELineStyle
public class RAVELineStyle
{
protected String name = null;
protected Vector parts = null;
public int getPartsCount();
public int getPart( int num );
}
RAVEContext
protected Hashtable lineStyles = null;
public int getLineStylesCount()
public RAVELineStyle getLineStyle(String styleName)
public RAVELineStyle setLineStyle(RAVELineStyle newStyle)
public RAVELineStyle removeLineStyle(String styleName)
public Enumeration getAllLineStyles()
|