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); }
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); }
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); }
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); }
private static extern bool DrawEdge(IntPtr hdc, ref GdiRect rect, int edge, int flags);
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)); }
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)); }
public static IntPtr CreateRectRgnIndirect(Rectangle Rect) { GdiRect rect1 = new GdiRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom); return(Win32.CreateRectRgnIndirect(ref rect1)); }
private static extern bool ScrollWindow(IntPtr Handle, int X, int Y, ref GdiRect R, int ClipR);
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)); }
public static extern int FrameRect(IntPtr DC, ref GdiRect R, IntPtr Brush);
public static extern int ExtTextOut(IntPtr hdc, int x, int y, uint options, ref GdiRect rect, string s, int len, IntPtr buffer);
private static extern int DrawText(IntPtr hdc, string s, int len, ref GdiRect rect, int format);
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)); }
public static extern bool DrawFocusRect(IntPtr hdc, ref GdiRect rect);
public static extern int FrameRect(IntPtr hdc, ref GdiRect rect, IntPtr brush);
private static extern int FillRect(IntPtr DC, ref GdiRect R, IntPtr Brush);
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)); }
public static int FrameRect(IntPtr DC, Rectangle R, IntPtr Brush) { GdiRect rect1 = new GdiRect(R); return(Win32.FrameRect(DC, ref rect1, Brush)); }
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); }
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); }
private static extern bool ScrollWindow(IntPtr handle, int x, int y, ref GdiRect r, IntPtr clipR);
private static extern IntPtr CreateRectRgnIndirect(ref GdiRect R);
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)); }
private static extern bool DrawFocusRect(IntPtr DC, ref GdiRect R);
private static extern int ExtTextOut(IntPtr DC, int X, int Y, int Options, ref GdiRect R, string S, int Len, IntPtr Buffer);
private static extern int DrawText(IntPtr DC, string S, int Len, ref GdiRect R, int Format);
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)); }
public static extern bool DrawThemeBackground(int theme, IntPtr hdc, int partID, int stateID, ref GdiRect rect, int clipRect);
public static IntPtr CreateRectRgnIndirect(Rectangle rect) { GdiRect rect2 = new GdiRect(rect.Left, rect.Top, rect.Right, rect.Bottom); return(CreateRectRgnIndirect(ref rect2)); }