Class StiFunctionsDrawing
java.lang.Object
com.stimulsoft.report.dictionary.functions.StiFunctionsDrawing
Copyright Stimulsoft
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StiColorARGB(int alpha, int red, int green, int blue) Creates a StiColor from the four ARGB component (alpha, red, green, and blue) values.static StiColorMakes a color darker or lighter on a specified fade value.static StiColorcolorValue(String value) Translates a String representation to a color.static StiFontstatic StiFontMakes a new font using a specified name, size and style.static StiGlareBrushglareBrushValue(Object startColor, Object endColor, double angle, double focus, double scale) Makes a glare brush.static StiGlassBrushglassBrushValue(Object color, boolean drawHatch, double blendFactor) Makes a glass brush.static StiGradientBrushgradientBrushValue(Object startColor, Object endColor, double angle) Makes a gradient brush.static StiHatchBrushhatchBrushValue(StiHatchStyle style, Object foreColor, Object backColor) Makes a hatch brush.static StiColorRGB(int red, int green, int blue) Creates a StiColor from the three RGB component (red, green, and blue) values.static StiSolidBrushsolidBrushValue(Object color) Makes a solid brush.
-
Constructor Details
-
StiFunctionsDrawing
public StiFunctionsDrawing()
-
-
Method Details
-
ARGB
Creates a StiColor from the four ARGB component (alpha, red, green, and blue) values.- Parameters:
alpha- An alpha component, which ranges from 0 (fully transparent) to 255 (fully opaque).red- A red component, which ranges from 0 (no saturation) to 255 (full saturation).green- A green component, which ranges from 0 (no saturation) to 255 (full saturation).blue- A blue component, which ranges from 0 (no saturation) to 255 (full saturation).- Returns:
- A color value.
-
RGB
Creates a StiColor from the three RGB component (red, green, and blue) values.- Parameters:
red- A red component, which ranges from 0 (no saturation) to 255 (full saturation).green- A green component, which ranges from 0 (no saturation) to 255 (full saturation).blue- A blue component, which ranges from 0 (no saturation) to 255 (full saturation).- Returns:
- A color value.
-
colorValue
Translates a String representation to a color. For example: ColorValue("Red"), ColorValue("#FF0000"), ColorValue("#55009900").- Parameters:
value- A String representation of a color to translate.- Returns:
- A color value.
-
colorFade
Makes a color darker or lighter on a specified fade value. For example: ColorFade(StiColor.Red, -0.5), ColorFade(StiColor.Green, 0.3).- Parameters:
color- A color value.fadeAmount- A number between -1 and 1. -1 fully darkens a color to black, 0 doesn't affect the color, and 1 fully brightens a color to white.- Returns:
- A color value.
-
solidBrushValue
Makes a solid brush. For example: SolidBrushValue("red"), SolidBrushValue(StiColor.Yellow).- Parameters:
color- A color value for the solid brush.- Returns:
- A solid brush.
-
gradientBrushValue
Makes a gradient brush. For example: GradientBrushValue("red", "green", 45), GradientBrushValue(StiColor.Red, StiColor.Green, 45).- Parameters:
startColor- A starting color for the gradient.endColor- An ending color for the gradient.angle- An angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.- Returns:
- A gradient brush.
-
glareBrushValue
public static StiGlareBrush glareBrushValue(Object startColor, Object endColor, double angle, double focus, double scale) Makes a glare brush. For example: GlareBrushValue("red", "green", 45), GlareBrushValue(StiColor.Red, StiColor.Green, 45).- Parameters:
startColor- A String representation of a starting color for the gradient.endColor- A String representation of a ending color for the gradient.angle- An angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.focus- A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).scale- A value from 0 through 1 that specifies how fast the colors falloff from the focus.- Returns:
- A glare brush.
-
glassBrushValue
Makes a glass brush. For example: GlassBrushValue("#ff0000", 0.2), GlassBrushValue(StiColor.Red, 0.2).- Parameters:
color- A color for the glass brush.drawHatch- Draw hatch at background or not.blendFactor- A blend factor. The value must be in range between 0 and 1.- Returns:
- A glass brush.
-
hatchBrushValue
public static StiHatchBrush hatchBrushValue(StiHatchStyle style, Object foreColor, Object backColor) Makes a hatch brush. For example: HatchBrushValue(StiHatchStyle.Cross, "gray", "white").- Parameters:
style- A hatch style of the brush.foreColor- A foreground color for the hatch brush.backColor- A background color for the hatch brush.- Returns:
- A hatch brush.
-
fontValue
-
fontValue
Makes a new font using a specified name, size and style.- Parameters:
name- A font name.size- A font size.style- A font style.- Returns:
- A created font.
-