- java.lang.Object
-
- com.github.weisj.jsvg.renderer.RenderContext
-
public final class RenderContext extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RenderContext.EstablishRootMeasure
-
Field Summary
Fields Modifier and Type Field Description private @Nullable ContextElementAttributes
contextElementAttributes
private @NotNull FontRenderContext
fontRenderContext
private @NotNull MeasurableFontSpec
fontSpec
private @NotNull MeasureContext
measureContext
private @NotNull PaintContext
paintContext
private @NotNull PlatformSupport
platformSupport
private @NotNull java.awt.geom.AffineTransform
rootTransform
private @NotNull java.awt.geom.AffineTransform
userSpaceTransform
-
Constructor Summary
Constructors Modifier Constructor Description private
RenderContext(@NotNull PlatformSupport platformSupport, @NotNull java.awt.geom.AffineTransform rootTransform, @NotNull java.awt.geom.AffineTransform userSpaceTransform, PaintContext paintContext, @NotNull MeasureContext measureContext, @NotNull FontRenderContext fontRenderContext, @NotNull MeasurableFontSpec fontSpec, @Nullable ContextElementAttributes contextElementAttributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private @Nullable ContextElementAttributes
contextElementAttributes()
private static @NotNull RenderContext
createInitial(@NotNull PlatformSupport awtSupport, @NotNull MeasureContext measureContext)
private @NotNull RenderContext
derive(@Nullable Mutator<PaintContext> context, @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable ViewBox viewBox, @Nullable FontRenderContext frc, @Nullable ContextElementAttributes contextAttributes, RenderContext.EstablishRootMeasure establishRootMeasure)
private @NotNull RenderContext
deriveForChildGraphics()
private @NotNull RenderContext
deriveForNode(@Nullable Mutator<PaintContext> context, @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable FontRenderContext frc, @Nullable ContextElementAttributes contextAttributes, @NotNull java.lang.Object node)
private @NotNull RenderContext
deriveForSurface()
private @NotNull RenderContext
deriveImpl(@Nullable Mutator<PaintContext> context, @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable ViewBox viewBox, @Nullable FontRenderContext frc, @Nullable ContextElementAttributes contextAttributes, @Nullable java.awt.geom.AffineTransform rootTransform, RenderContext.EstablishRootMeasure establishRootMeasure)
float
fillOpacity()
@NotNull SVGPaint
fillPaint()
private @NotNull FillRule
fillRule()
private @NotNull SVGFont
font()
private @NotNull FontRenderContext
fontRenderContext()
@NotNull MeasureContext
measureContext()
private @NotNull PaintOrder
paintOrder()
@NotNull PlatformSupport
platformSupport()
float
rawOpacity()
@NotNull java.awt.geom.AffineTransform
rootTransform()
void
rotate(@NotNull Output output, double angle)
void
scale(@NotNull Output output, double sx, double sy)
private void
setRootTransform(@NotNull java.awt.geom.AffineTransform rootTransform)
private void
setRootTransform(@NotNull java.awt.geom.AffineTransform rootTransform, @NotNull java.awt.geom.AffineTransform userSpaceTransform)
@NotNull java.awt.Stroke
stroke(float pathLengthFactor)
private @NotNull StrokeContext
strokeContext()
float
strokeOpacity()
@NotNull SVGPaint
strokePaint()
java.lang.String
toString()
void
transform(@NotNull Output output, @NotNull java.awt.geom.AffineTransform at)
void
translate(@NotNull Output output, double dx, double dy)
void
translate(@NotNull Output output, @NotNull java.awt.geom.Point2D dp)
@NotNull java.awt.geom.AffineTransform
userSpaceTransform()
-
-
-
Field Detail
-
platformSupport
@NotNull private final @NotNull PlatformSupport platformSupport
-
measureContext
@NotNull private final @NotNull MeasureContext measureContext
-
paintContext
@NotNull private final @NotNull PaintContext paintContext
-
fontRenderContext
@NotNull private final @NotNull FontRenderContext fontRenderContext
-
fontSpec
@NotNull private final @NotNull MeasurableFontSpec fontSpec
-
contextElementAttributes
@Nullable private final @Nullable ContextElementAttributes contextElementAttributes
-
rootTransform
@NotNull private final @NotNull java.awt.geom.AffineTransform rootTransform
-
userSpaceTransform
@NotNull private final @NotNull java.awt.geom.AffineTransform userSpaceTransform
-
-
Constructor Detail
-
RenderContext
private RenderContext(@NotNull @NotNull PlatformSupport platformSupport, @NotNull @NotNull java.awt.geom.AffineTransform rootTransform, @NotNull @NotNull java.awt.geom.AffineTransform userSpaceTransform, @NotNull PaintContext paintContext, @NotNull @NotNull MeasureContext measureContext, @NotNull @NotNull FontRenderContext fontRenderContext, @NotNull @NotNull MeasurableFontSpec fontSpec, @Nullable @Nullable ContextElementAttributes contextElementAttributes)
-
-
Method Detail
-
createInitial
@NotNull private static @NotNull RenderContext createInitial(@NotNull @NotNull PlatformSupport awtSupport, @NotNull @NotNull MeasureContext measureContext)
-
derive
@NotNull private @NotNull RenderContext derive(@Nullable @Nullable Mutator<PaintContext> context, @Nullable @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable @Nullable ViewBox viewBox, @Nullable @Nullable FontRenderContext frc, @Nullable @Nullable ContextElementAttributes contextAttributes, RenderContext.EstablishRootMeasure establishRootMeasure)
-
deriveImpl
@NotNull private @NotNull RenderContext deriveImpl(@Nullable @Nullable Mutator<PaintContext> context, @Nullable @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable @Nullable ViewBox viewBox, @Nullable @Nullable FontRenderContext frc, @Nullable @Nullable ContextElementAttributes contextAttributes, @Nullable @Nullable java.awt.geom.AffineTransform rootTransform, RenderContext.EstablishRootMeasure establishRootMeasure)
-
deriveForChildGraphics
@NotNull private @NotNull RenderContext deriveForChildGraphics()
-
deriveForSurface
@NotNull private @NotNull RenderContext deriveForSurface()
-
deriveForNode
@NotNull private @NotNull RenderContext deriveForNode(@Nullable @Nullable Mutator<PaintContext> context, @Nullable @Nullable Mutator<MeasurableFontSpec> attributeFontSpec, @Nullable @Nullable FontRenderContext frc, @Nullable @Nullable ContextElementAttributes contextAttributes, @NotNull @NotNull java.lang.Object node)
-
rootTransform
@NotNull public @NotNull java.awt.geom.AffineTransform rootTransform()
-
userSpaceTransform
@NotNull public @NotNull java.awt.geom.AffineTransform userSpaceTransform()
-
translate
public void translate(@NotNull @NotNull Output output, @NotNull @NotNull java.awt.geom.Point2D dp)
-
translate
public void translate(@NotNull @NotNull Output output, double dx, double dy)
-
scale
public void scale(@NotNull @NotNull Output output, double sx, double sy)
-
rotate
public void rotate(@NotNull @NotNull Output output, double angle)
-
transform
public void transform(@NotNull @NotNull Output output, @NotNull @NotNull java.awt.geom.AffineTransform at)
-
platformSupport
@NotNull public @NotNull PlatformSupport platformSupport()
-
measureContext
@NotNull public @NotNull MeasureContext measureContext()
-
strokePaint
@NotNull public @NotNull SVGPaint strokePaint()
-
fillPaint
@NotNull public @NotNull SVGPaint fillPaint()
-
rawOpacity
public float rawOpacity()
-
fillOpacity
public float fillOpacity()
-
strokeOpacity
public float strokeOpacity()
-
stroke
@NotNull public @NotNull java.awt.Stroke stroke(float pathLengthFactor)
-
strokeContext
@NotNull private @NotNull StrokeContext strokeContext()
-
fontRenderContext
@NotNull private @NotNull FontRenderContext fontRenderContext()
-
contextElementAttributes
@Nullable private @Nullable ContextElementAttributes contextElementAttributes()
-
fillRule
@NotNull private @NotNull FillRule fillRule()
-
paintOrder
@NotNull private @NotNull PaintOrder paintOrder()
-
font
@NotNull private @NotNull SVGFont font()
-
setRootTransform
private void setRootTransform(@NotNull @NotNull java.awt.geom.AffineTransform rootTransform)
-
setRootTransform
private void setRootTransform(@NotNull @NotNull java.awt.geom.AffineTransform rootTransform, @NotNull @NotNull java.awt.geom.AffineTransform userSpaceTransform)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-