Package com.github.weisj.jsvg.util
Class BlittableImage
java.lang.Object
com.github.weisj.jsvg.util.BlittableImage
Class that encapsulates rendering to an offscreen image.
The image is aligned to the pixel boundary of the root image surface. Rendering to the
image behaves and the blitting it behaves as if it was rendered directly to the root surface.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclearBackground(@NotNull Color color) @NotNull RenderContextcontext()static @Nullable BlittableImagecreate(@NotNull BlittableImage.BufferSurfaceSupplier bufferSurfaceSupplier, @NotNull RenderContext context, @Nullable Rectangle2D clipBounds, @NotNull Rectangle2D bounds, @NotNull Rectangle2D objectBounds, @NotNull UnitType contentUnits) static @Nullable BlittableImagecreate(@NotNull BlittableImage.BufferSurfaceSupplier bufferSurfaceSupplier, @NotNull RenderContext context, @Nullable Rectangle2D clipBounds, @NotNull Rectangle2D bounds, @NotNull Rectangle2D objectBounds, @NotNull UnitType contentUnits, @NotNull RenderContext imageContext) @NotNull Graphics2Dvoidvoid@NotNull BufferedImageimage()@NotNull Rectangle2DvoidprepareForBlitting(@NotNull Output output) voidrender(@NotNull Output output, @NotNull BiConsumer<Output, RenderContext> painter) voidrender(@NotNull Output output, @NotNull Consumer<Graphics2D> painter) voidrenderNode(@NotNull Output parentOutput, @NotNull SVGNode node, @NotNull Instantiator instantiator) @NotNull Rectangle2D
-
Method Details
-
create
@Nullable public static @Nullable BlittableImage create(@NotNull @NotNull BlittableImage.BufferSurfaceSupplier bufferSurfaceSupplier, @NotNull @NotNull RenderContext context, @Nullable @Nullable Rectangle2D clipBounds, @NotNull @NotNull Rectangle2D bounds, @NotNull @NotNull Rectangle2D objectBounds, @NotNull @NotNull UnitType contentUnits) -
create
@Nullable public static @Nullable BlittableImage create(@NotNull @NotNull BlittableImage.BufferSurfaceSupplier bufferSurfaceSupplier, @NotNull @NotNull RenderContext context, @Nullable @Nullable Rectangle2D clipBounds, @NotNull @NotNull Rectangle2D bounds, @NotNull @NotNull Rectangle2D objectBounds, @NotNull @NotNull UnitType contentUnits, @NotNull @NotNull RenderContext imageContext) -
context
-
imageBoundsInDeviceSpace
-
userBoundsInRootSpace
-
image
-
createGraphics
-
renderNode
public void renderNode(@NotNull @NotNull Output parentOutput, @NotNull @NotNull SVGNode node, @NotNull @NotNull Instantiator instantiator) -
clearBackground
-
render
-
render
public void render(@NotNull @NotNull Output output, @NotNull @NotNull BiConsumer<Output, RenderContext> painter) -
prepareForBlitting
-
blitTo
-
debug
-
debug
-