Modifier and Type | Field and Description |
---|---|
protected boolean |
hasWidthAndHeight
True if the viewbox has a width and height.
|
protected double |
height
The height attribute.
|
protected boolean |
preserveAspectRatio
True if the "preserveAspectRatio" attribute has a value different from "none".
|
protected double |
viewboxHeight
The height of the viewBox attribute.
|
protected double |
viewboxWidth
The width of the viewBox attribute.
|
protected double |
viewboxX
The x position of the viewBox attribute.
|
protected double |
viewboxY
The y position of the viewBox attribute.
|
protected double |
width
The width attribute.
|
Constructor and Description |
---|
Viewbox(double width,
double height) |
Modifier and Type | Method and Description |
---|---|
double |
getHeight()
Return the height.
|
double |
getViewboxHeight()
Return the viewBox height.
|
double |
getViewboxWidth()
Return the viewBox width.
|
double |
getViewboxX()
Return the viewBox x position.
|
double |
getViewboxY()
Return the viewBox y position.
|
double |
getWidth()
Return the width.
|
boolean |
isPreservingAspectRatio()
Return true if the aspect ratio must be preserved.
|
void |
scaleNode(javafx.scene.Node node)
Scale a Node.
|
double |
scaleValue(boolean isWidth,
double value)
Scale a SVG element attribute value.
|
void |
setPreserveAspectRatio(boolean preserveAspectRatio)
Set true if the aspect ratio must be preserved.
|
void |
setViewbox(double viewboxX,
double viewboxY,
double viewboxWidth,
double viewboxHeight)
Set the width and height of the viewBox
|
protected double width
protected double height
protected boolean hasWidthAndHeight
protected double viewboxX
protected double viewboxY
protected double viewboxWidth
protected double viewboxHeight
protected boolean preserveAspectRatio
public void setPreserveAspectRatio(boolean preserveAspectRatio)
preserveAspectRatio
- true if the aspect ratio must be preservedpublic boolean isPreservingAspectRatio()
public void setViewbox(double viewboxX, double viewboxY, double viewboxWidth, double viewboxHeight)
viewboxX
- the viewBox X coordinateviewboxY
- the viewBox y coordinateviewboxWidth
- the viewBox widthviewboxHeight
- the viewBox heightpublic void scaleNode(javafx.scene.Node node)
node
- the nodepublic double scaleValue(boolean isWidth, double value)
isPreservingAspectRatio()
returns true.isWidth
- true for a width valuevalue
- the valuepublic double getViewboxX()
public double getViewboxY()
public double getViewboxWidth()
public double getViewboxHeight()
public double getWidth()
public double getHeight()
Copyright © 2023. All rights reserved.