Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "rgn" in gdi32

.
Summary
.

static extern int CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1,

.

   IntPtr hrgnSrc2, int fnCombineMode);

.

Private Shared Function CombineRgn(ByVal hrgnDest As IntPtr,

.

   ByVal hrgnSrc1 As IntPtr, ByVal hrgnSrc2 As IntPtr,

.

public enum CombineRgnStyles:int

.

    RGN_AND         =1,

.

    RGN_OR          =2,

.

    RGN_XOR         =3,

.

    RGN_DIFF        =4,

.

    RGN_COPY        =5,

.

    RGN_MIN         =RGN_AND,

.

    RGN_MAX         =RGN_COPY

.

    public static extern IntPtr CreateEllipticRgn(int nLeftRect, int nTopRect,int nRightRect, int nBottomRect);

.

    static extern System.UInt16  SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw);

.

    static extern int CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1,IntPtr hrgnSrc2, int fnCombineMode);

.

            IntPtr r1 = CreateEllipticRgn(0,0,300,300);

.

            IntPtr r2 = CreateEllipticRgn(100,100,300,300);

.

            IntPtr r3= CreateEllipticRgn(100,100,300,300);

.

            CombineRgn(r3,r1,r2,0);

.

            SetWindowRgn(this.Handle,r3,true);

.
Documentation
[CombineRgn] on MSDN
.
Summary
.

static extern IntPtr CreateEllipticRgn(int nLeftRect, int nTopRect,

.

Public Function CreateEllipticRgn(ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer

.
Documentation
[CreateEllipticRgn] on MSDN
.
Summary
.

static extern IntPtr CreatePolygonRgn(POINT [] lppt, int cPoints,

.

static extern IntPtr CreatePolygonRgn(Point[] lppt, int cPoints, int fnPolyFillMode);

.

    IntPtr forma = CreatePolygonRgn(edges, edges.Length, 1);

.

    int iRes = SetWindowRgn(this.Handle, forma, true);

.
Documentation
[CreatePolygonRgn] on MSDN
.
Summary
.

static extern IntPtr CreatePolyPolygonRgn(POINT [] lppt, int [] lpPolyCounts,

.
Documentation
[CreatePolyPolygonRgn] on MSDN
.
Summary
.

static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);

.

Private Shared Function CreateRectRgn(ByVal nLeftRect As Integer, ByVal nTopRect As Integer, ByVal nRightRect As Integer, ByVal nBottomRect As Integer) As IntPtr

.

        static extern bool FillRgn(IntPtr hdc, IntPtr hrgn, IntPtr hbr);

.

        static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect,

.

                FillRgn(wDc, CreateRectRgn(0,0,mx,my), brush);

.
Documentation
[CreateRectRgn] on MSDN
.
Summary
.

static extern IntPtr CreateRoundRectRgn(int x1, int y1, int x2, int y2,

.

        IntPtr _RegionHandle = CreateRoundRectRgn( 10, 10, 60, 60, 10, 10 );

.

        Region _Region = Region.FromHrgn( _RegionHandle );

.
Documentation
[CreateRoundRectRgn] on MSDN
.

        static extern bool FillRgn(IntPtr hdc, IntPtr hrgn, IntPtr hbr);

.

        static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect,

.

                FillRgn(wDc, CreateRectRgn(0,0,mx,my), brush);

.
Summary
.

static extern bool FillRgn(IntPtr hdc, IntPtr hrgn, IntPtr hbr);

.

        static extern bool FillRgn(IntPtr hdc, IntPtr hrgn, IntPtr hbr);

.

        static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect,

.

                FillRgn(wDc, CreateRectRgn(0,0,mx,my), brush);

.
Documentation
[FillRgn] on MSDN
.
Summary
The GetClipRgn API. The GetClipRgn function retrieves a handle identifying the current application-defined clipping region for the specified device context.
.

static extern int GetClipRgn(IntPtr hdc, IntPtr hrgn);

.
Documentation
[GetClipRgn] on MSDN
.

static extern int GetRegionData(IntPtr hRgn, uint dwCount, IntPtr lpRgnData);

.

RGNDATAHEADER

.

  unsafe RECT[] RectsFromRegion(IntPtr hRgn)

.

    int dataSize = GetRegionData(hRgn, 0, IntPtr.Zero);

.

      int retValue = GetRegionData(hRgn, dataSize, bytes);

.

      RGNDATAHEADER * header = (RGNDATAHEADER*)bytes;

.
Summary
.

static extern int OffsetRgn(IntPtr hrgn, int nXOffset, int nYOffset);

.

        Call OffsetRgn(hndRegion, xoff, yoff)

.
Documentation
[OffsetRgn] on MSDN
.

static extern bool RectInRegion(IntPtr hrgn, [In] ref RECT lprc);

.
Summary
.

static extern int SelectClipRgn(IntPtr hdc, IntPtr hrgn);

.

IntPtr hRegion = CreateRectRgn(left, top, right, bottom);

.

SelectClipRgn(hdc, hRegion); // region will be copied

.

SelectClipRgn(hdc, IntPtr.Zero); // reset clip region

.
Documentation
[SelectClipRgn] on MSDN

 
Access PInvoke.net directly from VS: