com.partnersoft.maps.render
Class TextRenderingGeometry

java.lang.Object
  extended by com.partnersoft.maps.render.TextRenderingGeometry

public class TextRenderingGeometry
extends java.lang.Object

A utility class that calculates all the nonsense involved in text rendering.

Copyright 2007-2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Field Summary
 double ascent
           
 XyBounds bounds
           
 double height
           
 double lineHeight
           
 java.lang.String[] lines
           
 XyPoint location
           
 int pixelX
           
 int pixelY
           
 double rectX
           
 double rectY
           
 XyRotation rotation
           
 int stringPixelX
           
 int stringPixelY
           
 java.lang.String text
           
 double theta
           
 XyAffineTransform transform
           
 double width
           
 
Constructor Summary
TextRenderingGeometry(MapViewFrame frame, FontGraphics fontGraphics, double x, double y, int roverRotation, int alignment, java.lang.String text)
          Create a new TextRenderingGeometry and calculate all the relevant factors.
TextRenderingGeometry(MapViewFrame frame, com.sun.opengl.util.j2d.TextRenderer font, double x, double y, int roverRotation, int alignment, java.lang.String text)
           
 
Method Summary
 XyPoint[] createBox()
           
 XyPoint[] createCircle()
           
 XyPoint[] createHexBox()
           
 XyPoint[] createTransformedBox()
           
 XyPoint[] createTransformedCircle()
           
 XyPoint[] createTransformedHexBox()
           
 boolean intersects(XyBounds selectionBounds)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

location

public XyPoint location

text

public java.lang.String text

lines

public java.lang.String[] lines

lineHeight

public double lineHeight

bounds

public XyBounds bounds

rotation

public XyRotation rotation

pixelX

public int pixelX

pixelY

public int pixelY

stringPixelX

public int stringPixelX

stringPixelY

public int stringPixelY

theta

public double theta

ascent

public double ascent

transform

public XyAffineTransform transform

width

public double width

height

public double height

rectX

public double rectX

rectY

public double rectY
Constructor Detail

TextRenderingGeometry

public TextRenderingGeometry(MapViewFrame frame,
                             FontGraphics fontGraphics,
                             double x,
                             double y,
                             int roverRotation,
                             int alignment,
                             java.lang.String text)
Create a new TextRenderingGeometry and calculate all the relevant factors. x and y should already be adjusted for tiling and pixel offset.


TextRenderingGeometry

public TextRenderingGeometry(MapViewFrame frame,
                             com.sun.opengl.util.j2d.TextRenderer font,
                             double x,
                             double y,
                             int roverRotation,
                             int alignment,
                             java.lang.String text)
Method Detail

intersects

public boolean intersects(XyBounds selectionBounds)

createTransformedBox

public XyPoint[] createTransformedBox()

createBox

public XyPoint[] createBox()

createCircle

public XyPoint[] createCircle()

createTransformedCircle

public XyPoint[] createTransformedCircle()

createTransformedHexBox

public XyPoint[] createTransformedHexBox()

createHexBox

public XyPoint[] createHexBox()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object