public final class ChartBrush extends TeeBase
Title: ChartBrush class
Description: Common Chart Brush (pattern) used to fill polygons and rectangles.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Modifier and Type | Field and Description |
---|---|
protected Color |
color |
protected Color |
defaultColor |
protected boolean |
defaultVisible |
protected boolean |
visible |
chart, InternalUse
Constructor and Description |
---|
ChartBrush(IBaseChart c) |
ChartBrush(IBaseChart c,
boolean startVisible) |
ChartBrush(IBaseChart c,
Color aColor) |
ChartBrush(IBaseChart c,
Color aColor,
boolean startVisible) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDark(Color aColor,
int quantity) |
void |
applyDark(int quantity) |
void |
assign(ChartBrush b) |
void |
clearImage()
Clears the ChartBrush element from all associated bitmap images.
|
Color |
getColor()
Determines the color used to fill a zone.
|
Color |
getForegroundColor()
Color to fill inner portions of Brush, when Solid is false.
Default value: SILVER |
Gradient |
getGradient()
Fill Gradient.
Gradient specifies the colors used to fill a zone. |
boolean |
getGradientVisible() |
Image |
getImage()
Image to use for fill.
Default value: null |
ImageMode |
getImageMode()
Drawing Brush Image Style.
Default value: Stretch |
Rectangle |
getImageRect() |
boolean |
getImageTransparent()
The Brush image will be Transparent when true.
Default value: false |
Paint |
getPaint() |
Paint |
getPaint(Point[] p) |
Paint |
getPaint(PointDouble[] p) |
Paint |
getPaint(Rectangle rect) |
boolean |
getSolid()
Fills using Color only.
|
HatchStyle |
getStyle()
Determines the style in which the zone is filled or patterned using both
Color and ForegroundColor.
Default value: HatchStyle.BackwardDiagonal |
int |
getTransparency()
The Transparency level from 0 to 100%.
Transparency is a value between 0 and 100 which sets the transparency percentage with respect to foreground versus background. Default value: 0 |
boolean |
getVisible()
Determines if the brush will draw lines or not.
|
boolean |
getWrapTile()
Drawing Brush Image Style.
Default value: Tile |
void |
invalidate()
Use invalidate when the entire canvas needs to be repainted.
When more than one region within the canvas needs repainting, Invalidate will cause the entire window to be repainted in a single pass, avoiding flicker caused by redundant repaints. |
void |
loadImage(java.io.InputStream stream)
Loads a bitmap into a ChartBrush element from the specified stream.
|
void |
loadImage(java.lang.String fileName)
Loads a bitmap into a ChartBrush element from the specified path.
|
void |
loadImage(java.net.URL location)
Loads a bitmap into a ChartBrush element from the specified URL.
|
void |
reset() |
void |
setChart(IBaseChart c)
Chart associated with this object.
|
void |
setColor(Color value)
Specifies the color used to fill a zone.
|
void |
setDefaultColor(Color value) |
void |
setDefaultVisible(boolean value) |
void |
setForegroundColor(Color value)
Specifies the Color to fill inner portions of Brush, when Solid is false.
|
void |
setGradient(Gradient value)
Sets the Gradient fill.
Default value: null |
void |
setImage(Image value)
Image to use for fill.
Default value: null |
void |
setImageMode(ImageMode value)
Drawing Brush Image Style.
Default value: Stretch |
void |
setImageTransparent(boolean value)
Sets the Brush image to Transparent.
Default value: false |
void |
setSolid(boolean value)
Fills using Color only.
|
void |
setStyle(HatchStyle value)
Determines the style in which the zone is filled or patterned using both
Color and ForegroundColor.
Default value: HatchStyle.BackwardDiagonal |
void |
setTransparency(int value)
Sets Transparency level from 0 to 100%.
Default value: 0 |
void |
setVisible(boolean value)
Determines if the brush will draw lines or not.
|
void |
setWrapTile(boolean value)
Drawing Brush Image Style.
Default value: Tile |
getChart, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
protected boolean visible
protected Color color
protected transient Color defaultColor
protected transient boolean defaultVisible
public ChartBrush(IBaseChart c, boolean startVisible)
public ChartBrush(IBaseChart c)
public ChartBrush(IBaseChart c, Color aColor)
public ChartBrush(IBaseChart c, Color aColor, boolean startVisible)
public void reset()
public void assign(ChartBrush b)
public void setDefaultColor(Color value)
public void setChart(IBaseChart c)
TeeBase
public int getTransparency()
public void setTransparency(int value)
value
- intpublic boolean getSolid()
public void setSolid(boolean value)
value
- booleanpublic boolean getImageTransparent()
public void setImageTransparent(boolean value)
value
- booleanpublic boolean getGradientVisible()
public Gradient getGradient()
public void setGradient(Gradient value)
value
- Gradientpublic void invalidate()
invalidate
in class TeeBase
public ImageMode getImageMode()
public void setImageMode(ImageMode value)
value
- ImageModepublic Rectangle getImageRect()
public boolean getWrapTile()
public void setWrapTile(boolean value)
value
- booleanpublic Color getForegroundColor()
public void setForegroundColor(Color value)
value
- Colorprotected void applyDark(Color aColor, int quantity)
public void applyDark(int quantity)
public Color getColor()
public void setColor(Color value)
value
- Colorpublic boolean getVisible()
public void setVisible(boolean value)
value
- booleanpublic void setDefaultVisible(boolean value)
public HatchStyle getStyle()
public void setStyle(HatchStyle value)
value
- HatchStylepublic Image getImage()
public void setImage(Image value)
value
- Imagepublic void loadImage(java.lang.String fileName)
fileName
- Stringpublic void loadImage(java.net.URL location)
location
- URLpublic void loadImage(java.io.InputStream stream)
stream
- InputStreampublic void clearImage()
public Paint getPaint()
public Paint getPaint(Rectangle rect)
public Paint getPaint(Point[] p)
public Paint getPaint(PointDouble[] p)