org.pushingpixels.radiance.tools.svgtranscoder.api.kotlin.SvgTranscoderTemplatePlain.templ Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swingset3-demos Show documentation
Show all versions of swingset3-demos Show documentation
Demonstrating the abilities of the Swing UI Toolkit swingset2 and swingx aka swingset3
The newest version!
TOKEN_PACKAGE
import java.awt.*
import java.awt.geom.*
import java.lang.ref.WeakReference
import java.util.Stack
/**
* This class has been automatically generated using Radiance SVG transcoder.
*/
class TOKEN_CLASSNAME(private var width: Int, private var height: Int) {
companion object {
@Suppress("UNUSED_VARIABLE") private var shape: Shape? = null
@Suppress("UNUSED_VARIABLE") private var generalPath: GeneralPath? = null
@Suppress("UNUSED_VARIABLE") private var paint: Paint? = null
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
private val transformsStack = Stack()
TOKEN_RASTER_CODE
TOKEN_PAINTING_CODE
/**
* Paints the transcoded SVG image on the specified graphics context. You
* can install a custom transformation on the graphics context to scale the
* image.
*
* @param g
* Graphics context.
*/
fun paint(g: Graphics2D) {
var origAlpha = 1.0f
val origComposite = g.composite
if (origComposite is AlphaComposite) {
if (origComposite.rule == AlphaComposite.SRC_OVER) {
origAlpha = origComposite.alpha
}
}
TOKEN_PAINTING_INVOCATIONS
shape = null
generalPath = null
paint = null
stroke = null
clip = null
}
/**
* Returns the X of the bounding box of the original SVG image.
*
* @return The X of the bounding box of the original SVG image.
*/
fun getOrigX(): Double {
return TOKEN_ORIG_X
}
/**
* Returns the Y of the bounding box of the original SVG image.
*
* @return The Y of the bounding box of the original SVG image.
*/
fun getOrigY(): Double {
return TOKEN_ORIG_Y
}
/**
* Returns the width of the bounding box of the original SVG image.
*
* @return The width of the bounding box of the original SVG image.
*/
fun getOrigWidth(): Double {
return TOKEN_ORIG_WIDTH
}
/**
* Returns the height of the bounding box of the original SVG image.
*
* @return The height of the bounding box of the original SVG image.
*/
fun getOrigHeight(): Double {
return TOKEN_ORIG_HEIGHT
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy