The settings an output consults when it renders a picture. They belong to the output. Construction defaults, such as where a shape is centered, are plain default arguments of the members that build pictures. There is no global configuration and no implicit instance. Every member that renders takes the settings as an ordinary parameter, defaulting to smile.RenderSettings.Default, as in this example.
val bitmap = picture.toBitmap(RenderSettings(drawingIsAntiAliased = false))
Value parameters
- bufferScalingMethod
-
The interpolation used when a buffer is scaled, and when a renderer draws a bitmap at another size than its buffer's.
- bufferTransformMethod
-
The interpolation used when a buffer is affinely transformed.
- drawingIsAntiAliased
-
Whether shapes and text are drawn with antialiasing.
- normalizesStrokes
-
Whether Java2D may normalize outlines with
RenderingHints.VALUE_STROKE_NORMALIZE, its own default. When false, it draws them where their geometry says, withVALUE_STROKE_PURE. Only the JVM renderer reads this setting. Without antialiasing, normalization nudges the edges of fills and strokes up to half a pixel down and to the right, so ink can leave the boundary at the bottom and right, where a bitmap sized from the boundary cuts it off, and the JVM no longer draws edges where the canvas does. A shape turned by other than a right angle is drawn about half a pixel down and right of the point it turns around (SMILe issue #21). It is here for programs that must keep the pixels of renderers that normalized, as earlier versions of SMILe did. - resamplingMode
-
How a bitmap is resampled when it is scaled or rotated more than once.
Attributes
- Companion
- object
- Source
- RenderSettings.scala
- Graph
-
- Supertypes
