|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.gdi.GdiObject com.jniwrapper.win32.gdi.Brush
public class Brush
This class provides methods and enumerations to work with brushes.
Nested Class Summary | |
---|---|
static class |
Brush.BrushStyle
BrushStyle class represents the enumeration of brush styles. |
static class |
Brush.HatchStyle
HatchStyle class represents the enumeration of hatch styles. |
static class |
Brush.StockBrush
Enumeration of stock brushes. |
Nested classes/interfaces inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type |
Field Summary |
---|
Fields inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GDI_ERROR, HGDI_ERROR |
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
Brush()
Creates an empty brush. |
|
Brush(Brush.BrushStyle style)
Constructs a new brush with the passed style. |
|
Brush(long handle)
Constructs a brush with a given handle. |
Method Summary | |
---|---|
static Brush |
createBrushIndirect(LogBrush lb)
Creates a logical brush that has the specified style, color, and pattern. |
static Brush |
createHatchBrush(Brush.HatchStyle style,
ColorRef colorRef)
Creates a logical brush that has the specified hatch pattern and color. |
static Brush |
createPatternBrush(Bitmap bitmap)
Creates a logical brush with the specified bitmap pattern. |
static Brush |
createSolidBrush(ColorRef colorRef)
Creates a logical brush that has the specified solid color. |
static Point |
getBrushOrigin(DC hDC)
Retrieves the current brush origin for the specified device context. |
static Brush |
getStockObject(Brush.StockBrush object)
This method retrieves one of the predefined stock brushes. |
static Brush |
getSysColorBrush(int index)
Retrieves a handle of a logical brush that corresponds to the specified color index. |
static Point |
setBrushOrigin(DC hDC,
int xOrg,
int yOrg)
Sets the brush origin that GDI assigns to the next brush which an application selects into the specified device context. |
Methods inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
deleteObject, getObject, getObjectType |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Brush()
public Brush(long handle)
handle
- a handle for already existing brush object.public Brush(Brush.BrushStyle style)
style
- brush style.Method Detail |
---|
public static Brush getStockObject(Brush.StockBrush object)
object
- the type of stock brush.
null
if the method fails.public static Brush createBrushIndirect(LogBrush lb)
lb
- definition of a new brush.
null
if
otherwise.public static Brush createHatchBrush(Brush.HatchStyle style, ColorRef colorRef)
style
- hatch style of the brush.colorRef
- the color of a new brush.
null
if the method fails.public static Brush createPatternBrush(Bitmap bitmap)
bitmap
- the background for a newly created brush.
null
if the method fails.public static Brush createSolidBrush(ColorRef colorRef)
getSysColorBrush(int)
instead, because it returns a cached system object
instead of allocating a new one.
colorRef
- the color for a brush.
null
class if the method fails.public static Point getBrushOrigin(DC hDC)
hDC
- current device context.
null
if the method fails.public static Brush getSysColorBrush(int index)
index
- a color index.
null
.public static Point setBrushOrigin(DC hDC, int xOrg, int yOrg)
hDC
- current device context.xOrg
- the x-coordinate of the new brush origin in device units. If
this value is greater than the brush width, the system reduces its value
using the modulus operator (xOrg
mod brush width).yOrg
- the y-coordinate of the new brush origin in device units. If
this value is greater than the brush height, the system reduces it by
using the modulus operator (yOrg
mod brush height).
null
if the method
fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |