Brush Origin
When an application calls a drawing function to paint a shape, Windows
positions a brush at the start of the paint operation and maps a pixel in the brush
bitmap to the window origin of the client area. (The
window origin is the upper-left corner of the window's client area.) The coordinates of
the pixel that Windows maps are called the
brush origin. The default brush origin is located in the upper-left corner of the brush
bitmap, at the coordinates (0,0). Windows then copies the brush across the client
area, forming a pattern that is as tall as the bitmap. The copy operation
continues, row by row, until the entire client area is filled. However, the brush
pattern is visible
only within the boundaries of the specified shape.
There are instances when the default brush origin should not be used. For
example, it may be necessary for an application to use the same brush to paint the
backgrounds of its parent and child windows
and blend a child window's background with that of the parent window. To do this,
the application should reset the brush origin by calling the
SetBrushOrgEx function and shifting the origin the required number of pixels. (An
application can retrieve the current brush origin by calling the
GetBrushOrgEx function.)
The following illustration shows a five-pointed star filled by using an
application-defined brush. The illustration shows a zoomed image of the brush, as
well as the location to which it was mapped at the beginning of the paint
operation.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database