smile
Members list
Packages
Type members
Classlikes
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.
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
- Supertypes
Attributes
- Companion
- class
- Source
- RenderSettings.scala
- Supertypes
- Self type
-
RenderSettings.type
How a bitmap is resampled when a picture is scaled or rotated for an output.
How a bitmap is resampled when a picture is scaled or rotated for an output.
A bitmap records the operations done to it (see smile.pictures.Bitmap). The mode says what an output does with them.
Attributes
- Source
- RenderSettings.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
How bitmaps are resampled when a bitmap's buffer is scaled (Bitmap.scaleBy, scaleTo) and when a renderer draws a bitmap at another size than its buffer's, as under a display scale factor or in an SVG that is shown enlarged. AWT, canvas and SVG's image-rendering all follow the method, and each method means the same on both platforms as far as each renderer can tell them apart:
How bitmaps are resampled when a bitmap's buffer is scaled (Bitmap.scaleBy, scaleTo) and when a renderer draws a bitmap at another size than its buffer's, as under a display scale factor or in an SVG that is shown enlarged. AWT, canvas and SVG's image-rendering all follow the method, and each method means the same on both platforms as far as each renderer can tell them apart:
Smooth, the default, interpolates bilinearly between the pixels, so an enlarged bitmap blends from each pixel into the next.NearestNeighborandFastcopy the nearest pixel, so an enlarged bitmap is made of blocks.AreaAveragingaverages the area each new pixel covers, which is the better way to make a bitmap smaller and enlarges into blocks. Only the JVM's buffer scaling has it (see java.awt.Image). On Scala.js, and where a renderer resamples as it draws, it is smooth.
The method in effect is the bufferScalingMethod of the smile.RenderSettings a renderer is given, and the default's for a bitmap's own scaling.
Attributes
- Source
- ScalingMethod.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
How bitmaps are resampled when they are affinely transformed, as Bitmap.rotateAround does. See java.awt.image.AffineTransformOp for details. The method in effect is the bufferTransformMethod of the default smile.RenderSettings.
How bitmaps are resampled when they are affinely transformed, as Bitmap.rotateAround does. See java.awt.image.AffineTransformOp for details. The method in effect is the bufferTransformMethod of the default smile.RenderSettings.
Attributes
- Source
- TransformMethod.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
