다음을 통해 공유


CDC::SetBrushOrg

Specifies the origin that GDI will assign to the next brush that the application selects into the device context.

CPoint SetBrushOrg(
   int x,
   int y 
);
CPoint SetBrushOrg(
   POINT point 
);

Parameters

  • x
    Specifies the x-coordinate (in device units) of the new origin. This value must be in the range 0–7.

  • y
    Specifies the y-coordinate (in device units) of the new origin. This value must be in the range 0–7.

  • point
    Specifies the x- and y-coordinates of the new origin. Each value must be in the range 0–7. You can pass either a POINT structure or a CPoint object for this parameter.

Return Value

The previous origin of the brush in device units.

Remarks

The default coordinates for the brush origin are (0, 0). To alter the origin of a brush, call the UnrealizeObject function for the CBrush object, call SetBrushOrg, and then call the SelectObject member function to select the brush into the device context.

Do not use SetBrushOrg with stock CBrush objects.

Requirements

Header: afxwin.h

See Also

Concepts

CDC Class

CDC Members

Hierarchy Chart

CBrush Class

CDC::GetBrushOrg

CDC::SelectObject

CGdiObject::UnrealizeObject

POINT Structure

CPoint Class