public interface IRenderer<T extends IChemObject>
IGenerators' IGeneratorParameters with
with the associated RendererModel.| Modifier and Type | Method and Description |
|---|---|
Rectangle |
calculateDiagramBounds(T object)
Given a
IChemObject, calculates the bounding rectangle in screen
space. |
IRenderingElement |
generateDiagram(T obj)
Internal method to generate the intermediate format.
|
List<IGenerator<T>> |
getGenerators()
Returns a
List of IGenerators for this renderer. |
RendererModel |
getRenderer2DModel()
Returns the drawing model, giving access to drawing parameters.
|
Rectangle |
paint(T object,
IDrawVisitor drawVisitor)
Paint an IChemObject.
|
void |
paint(T object,
IDrawVisitor drawVisitor,
Rectangle2D bounds,
boolean resetCenter)
Paint the chem object within the specified bounds.
|
void |
setScale(T object)
Set the scale for an
IChemObject. |
void |
setup(T object,
Rectangle screen)
Setup the transformations necessary to draw the
IChemObject
matching this IRenderer implementation. |
void |
setZoom(double zoomFactor)
Set a new zoom factor.
|
void |
shiftDrawCenter(double screenX,
double screenY)
Set a new drawing center in screen coordinates.
|
javax.vecmath.Point2d |
toModelCoordinates(double screenXTo,
double screenYTo)
Converts screen coordinates into model (or world) coordinates.
|
javax.vecmath.Point2d |
toScreenCoordinates(double screenXTo,
double screenYTo)
Converts model (or world) coordinates into screen coordinates.
|
IRenderingElement generateDiagram(T obj)
obj - the IChemObject to generate a diagram forRendererModel getRenderer2DModel()
javax.vecmath.Point2d toModelCoordinates(double screenXTo,
double screenYTo)
screenXTo - the screen's x coordinatescreenYTo - the screen's y coordinatetoScreenCoordinates(double, double)javax.vecmath.Point2d toScreenCoordinates(double screenXTo,
double screenYTo)
screenXTo - the model's x coordinatescreenYTo - the model's y coordinatetoModelCoordinates(double, double)void setZoom(double zoomFactor)
zoomFactor - the new zoom factorvoid shiftDrawCenter(double screenX,
double screenY)
screenX - the x screen coordinate of the drawing centerscreenY - the y screen coordinate of the drawing centerRectangle paint(T object, IDrawVisitor drawVisitor)
object - the chem object to paintdrawVisitor - the class that visits the generated elementsvoid paint(T object, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter)
object - Object to drawdrawVisitor - the visitor to draw tobounds - the screen bounds between which to drawresetCenter - a boolean indicating the the drawing center needs to be resetvoid setup(T object, Rectangle screen)
IChemObject
matching this IRenderer implementation.object - IChemObject to be drawnscreen - Rectangle to draw the object tovoid setScale(T object)
IChemObject. It calculates the average bond
length of the model and calculates the multiplication factor to transform
this to the bond length that is set in the RendererModel.object - the IChemObject to draw.Rectangle calculateDiagramBounds(T object)
IChemObject, calculates the bounding rectangle in screen
space.object - the IChemObject to draw.List<IGenerator<T>> getGenerators()
List of IGenerators for this renderer.Copyright © 2018. All Rights Reserved.