Esempio n. 1
0
        public static int ExtTextOut(IntPtr DC, int X, int Y, int Width, int Height, int Options, string S, int Len, int[] spacings)
        {
            int num4;

            if (spacings == null)
            {
                return(Win32.ExtTextOut(DC, X, Y, Width, Height, Options, S, Len));
            }
            int     num1  = spacings.GetLength(0);
            int     num2  = (Len > 0) ? Len : S.Length;
            GdiRect rect1 = new GdiRect(X, Y, X + Width, Y + Height);
            IntPtr  ptr1  = Marshal.AllocHGlobal((int)(num2 * 4));

            try
            {
                for (int num3 = 0; num3 < num2; num3++)
                {
                    Marshal.WriteInt32(ptr1, (int)(num3 * 4), (num3 < num1) ? spacings[num3] : 0);
                }
                num4 = Win32.ExtTextOut(DC, X, Y, Options, ref rect1, S, Len, ptr1);
            }
            finally
            {
                Marshal.FreeHGlobal(ptr1);
            }
            return(num4);
        }
Esempio n. 2
0
        public static int ExtTextOutW(IntPtr hdc, Rectangle rect, int x, int y, int options, string s, int len, int[] spacings)
        {
            int num3;

            GdiRect rect2 = new GdiRect(rect);

            if (len < 0)
            {
                len = s.Length;
            }
            IntPtr ptr = (spacings != null) ? Marshal.AllocHGlobal((int)(len * 4)) : IntPtr.Zero;

            try {
                if (ptr != IntPtr.Zero)
                {
                    int length = spacings.Length;
                    for (int i = 0; i < len; i++)
                    {
                        Marshal.WriteInt32(ptr, i * 4, (i < length) ? spacings[i] : 0);
                    }
                }
                num3 = ExtTextOut(hdc, x, y, (uint)options, ref rect2, s, len, ptr);
            } finally {
                if (ptr != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(ptr);
                }
            }
            return(num3);
        }
Esempio n. 3
0
        public static int DrawText(IntPtr hdc, string s, int len, ref Rectangle rect, int format)
        {
            GdiRect rect2 = new GdiRect(rect);
            int     num   = DrawText(hdc, s, len, ref rect2, format);

            rect = rect2.ToRectangle();
            return(num);
        }
Esempio n. 4
0
        public static bool DrawEdge(IntPtr hdc, ref Rectangle rect, int edge, int flags)
        {
            GdiRect rect2 = new GdiRect(rect);

            bool flag = DrawEdge(hdc, ref rect2, edge, flags);

            rect = new Rectangle(rect2.left, rect2.top, rect2.right - rect2.left, rect2.bottom - rect2.top);
            return(flag);
        }
Esempio n. 5
0
 private static extern bool DrawEdge(IntPtr hdc, ref GdiRect rect, int edge, int flags);
Esempio n. 6
0
        public static int DrawText(IntPtr DC, string S, int Len, ref Rectangle R, int Format)
        {
            GdiRect rect1 = new GdiRect(R);

            return(Win32.DrawText(DC, S, Len, ref rect1, Format));
        }
Esempio n. 7
0
        public static bool DrawFocusRect(IntPtr DC, int X1, int Y1, int X2, int Y2)
        {
            GdiRect rect1 = new GdiRect(X1, Y1, X2, Y2);

            return(Win32.DrawFocusRect(DC, ref rect1));
        }
Esempio n. 8
0
        public static IntPtr CreateRectRgnIndirect(Rectangle Rect)
        {
            GdiRect rect1 = new GdiRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);

            return(Win32.CreateRectRgnIndirect(ref rect1));
        }
Esempio n. 9
0
 private static extern bool ScrollWindow(IntPtr Handle, int X, int Y, ref GdiRect R, int ClipR);
Esempio n. 10
0
        public static int FrameRect(IntPtr DC, int X, int Y, int W, int H, IntPtr Brush)
        {
            GdiRect rect1 = new GdiRect(X, Y, X + W, Y + H);

            return(Win32.FrameRect(DC, ref rect1, Brush));
        }
Esempio n. 11
0
 public static extern int FrameRect(IntPtr DC, ref GdiRect R, IntPtr Brush);
Esempio n. 12
0
 public static extern int ExtTextOut(IntPtr hdc, int x, int y, uint options, ref GdiRect rect, string s, int len, IntPtr buffer);
Esempio n. 13
0
 private static extern int DrawText(IntPtr hdc, string s, int len, ref GdiRect rect, int format);
Esempio n. 14
0
        public static bool DrawFocusRect(IntPtr hdc, int x, int y, int w, int h)
        {
            GdiRect rect = new GdiRect(x, y, x + w, y + h);

            return(DrawFocusRect(hdc, ref rect));
        }
Esempio n. 15
0
 public static extern bool DrawFocusRect(IntPtr hdc, ref GdiRect rect);
Esempio n. 16
0
 public static extern int FrameRect(IntPtr hdc, ref GdiRect rect, IntPtr brush);
Esempio n. 17
0
 private static extern int FillRect(IntPtr DC, ref GdiRect R, IntPtr Brush);
Esempio n. 18
0
        public static int FrameRect(IntPtr hdc, int x, int y, int w, int h, IntPtr brush)
        {
            GdiRect rect = new GdiRect(x, y, x + w, y + h);

            return(FrameRect(hdc, ref rect, brush));
        }
Esempio n. 19
0
        public static int FrameRect(IntPtr DC, Rectangle R, IntPtr Brush)
        {
            GdiRect rect1 = new GdiRect(R);

            return(Win32.FrameRect(DC, ref rect1, Brush));
        }
Esempio n. 20
0
        public static void ScrollWindow(IntPtr handle, int x, int y, Rectangle rect)
        {
            GdiRect r = new GdiRect(rect);

            ScrollWindow(handle, x, y, ref r, IntPtr.Zero);
        }
Esempio n. 21
0
        public static void ScrollWindow(IntPtr Handle, int X, int Y, Rectangle R)
        {
            GdiRect rect1 = new GdiRect(R);

            Win32.ScrollWindow(Handle, X, Y, ref rect1, 0);
        }
Esempio n. 22
0
 private static extern bool ScrollWindow(IntPtr handle, int x, int y, ref GdiRect r, IntPtr clipR);
Esempio n. 23
0
 private static extern IntPtr CreateRectRgnIndirect(ref GdiRect R);
Esempio n. 24
0
        public static int ExtTextOut(IntPtr DC, Rectangle R, int X, int Y, int Options, string S, int Len)
        {
            GdiRect rect1 = new GdiRect(R);

            return(Win32.ExtTextOut(DC, X, Y, Options, ref rect1, S, Len, IntPtr.Zero));
        }
Esempio n. 25
0
 private static extern bool DrawFocusRect(IntPtr DC, ref GdiRect R);
Esempio n. 26
0
 private static extern int ExtTextOut(IntPtr DC, int X, int Y, int Options, ref GdiRect R, string S, int Len, IntPtr Buffer);
Esempio n. 27
0
 private static extern int DrawText(IntPtr DC, string S, int Len, ref GdiRect R, int Format);
Esempio n. 28
0
        public static int ExtTextOut(IntPtr DC, int X, int Y, int Width, int Height, int Options, string S, int Len)
        {
            GdiRect rect1 = new GdiRect(X, Y, X + Width, Y + Height);

            return(Win32.ExtTextOut(DC, X, Y, Options, ref rect1, S, Len, IntPtr.Zero));
        }
Esempio n. 29
0
 public static extern bool DrawThemeBackground(int theme, IntPtr hdc, int partID, int stateID, ref GdiRect rect, int clipRect);
Esempio n. 30
0
        public static IntPtr CreateRectRgnIndirect(Rectangle rect)
        {
            GdiRect rect2 = new GdiRect(rect.Left, rect.Top, rect.Right, rect.Bottom);

            return(CreateRectRgnIndirect(ref rect2));
        }