Package bagel
Class DrawOptions
java.lang.Object
bagel.DrawOptions
Allows you to specify detailed options for drawing images.
Used with
Image.draw(double, double, DrawOptions).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetBlendColour(double r, double g, double b) Sets the colour to blend the image with, where (0.0, 0.0, 0.0) is black and (1.0, 1.0, 1.0) is white.setBlendColour(double r, double g, double b, double a) Sets the colour to blend the image with, where (0.0, 0.0, 0.0) is black and (1.0, 1.0, 1.0) is white.setBlendColour(Colour colour) Sets the colour to blend the image with, using theColourclass.setRotation(double rotation) Set the rotation of the image in the usual mathematical sense, measured in radians.setScale(double xscale, double yscale) Set the scale of the image.setSection(double xBegin, double yBegin, double width, double height) Sets only a section of the image to be drawn.For very advanced users only. Set the shader to use for this rendering job.
-
Constructor Details
-
DrawOptions
public DrawOptions()
-
-
Method Details
-
setScale
Set the scale of the image. A value of 1.0 results in no stretching. -
setRotation
Set the rotation of the image in the usual mathematical sense, measured in radians. -
setBlendColour
Sets the colour to blend the image with, where (0.0, 0.0, 0.0) is black and (1.0, 1.0, 1.0) is white. -
setBlendColour
Sets the colour to blend the image with, where (0.0, 0.0, 0.0) is black and (1.0, 1.0, 1.0) is white.- Parameters:
a- the alpha (transparency ratio) to use
-
setBlendColour
Sets the colour to blend the image with, using theColourclass. -
setSection
Sets only a section of the image to be drawn. The subimage will be drawn from (xBegin, yBegin) to (xBegin + width, yBegin + height); -
setShader
For very advanced users only. Set the shader to use for this rendering job. Setting up uniforms is your problem.
-