gvSIG feature requests #547
Añadir a Geometry los metodos scale, rotate y move.
Status: | Closed | % Done: | 0% | |
---|---|---|---|---|
Priority: | Normal | Spent time: | - | |
Assignee: | Juan Lucas Domínguez | |||
Category: | Vector editing | |||
Target version: | 2.0.0-rc1 | |||
gvSIG version: | 2.0.0 | Add-on resolve version: | ||
Keywords: | Add-on resolve build: | |||
Has patch: | No | Proyecto: | ||
Add-on name: | Application gvSIG (org.gvsig.app) | Hito: | ||
Add-on version: |
Description
En la clase UtilFunctions del proyecto de geometrias hay tres metdos estaticos:
public static void rotateGeom(Geometry geometry, double radAngle, double basex, double basey) { AffineTransform at = new AffineTransform(); at.rotate(radAngle,basex,basey); geometry.transform(at); } public static void moveGeom(Geometry geometry, double dx, double dy) { AffineTransform at = new AffineTransform(); at.translate(dx, dy); geometry.transform(at); } public static void scaleGeom(Geometry geometry, Point2D basePoint, double sx, double sy) { AffineTransform at = new AffineTransform(); at.setToTranslation(basePoint.getX(),basePoint.getY()); at.scale(sx,sy); at.translate(-basePoint.getX(),-basePoint.getY()); geometry.transform(at); }
Habria que crear en el interface Geometry los metodos :
public void rotate(double radAngle, double basex, double basey); public void move(double dx, double dy); public void scale(Point basePoint, double sx, double sy);
Dando una implementacion similar a la que hay ahora en el UtilFunctions en las clases:
- AbstractPrimitive
- BaseMultiPrimitive
Eliminando estos metodos de UtilFunctions y sustituyendo en el codigo base de gvSIG
(exEditing principalmente) las llamadas a unos por la de los otros.
History
#1 Updated by Joaquín del Cerro Murciano about 12 years ago
- Assignee set to Víctor Acevedo
#2 Updated by Manuel Madrid almost 12 years ago
- Target version set to 2.0.0-rc1
#3 Updated by Joaquín del Cerro Murciano over 11 years ago
- Assignee changed from Víctor Acevedo to Juan Lucas Domínguez
#4 Updated by Juan Lucas Domínguez over 11 years ago
- Status changed from New to In progress
#5 Updated by Juan Lucas Domínguez over 11 years ago
Those methods simply create an AffineTransform object and call the method transform(AffineTransform at) which is implemented by BaseMultiPrimitive (which extends AbstractPrimitive), so the new methods must only be implemented in AbstractPrimitive.
#6 Updated by Juan Lucas Domínguez over 11 years ago
Added rotate, move and rotate to Geometry API. Also some simple unit tests.
#7 Updated by Juan Lucas Domínguez over 11 years ago
- Status changed from In progress to Fixed
Removed use of methods of deprecated UtilFunctions
gvsig-desktop:r39048
Finally removed unwanted, unused methods in deprecated UtilFunctions.
gvsig-desktop:r39049
#8 Updated by Juan Lucas Domínguez over 11 years ago
Test in BN 2057 or higher:
- Create a view, add any SHP file
- Start editing mode
- Test the MOVE, ROTATE and SCALE tools
- If everything is ok, then you can close this ticket because the code of those tools has changed.
#9 Updated by Vicent Domenech over 11 years ago
- Status changed from Fixed to Closed
Closed with gvSIG vuild 2056