public GDIStockObject(StockObjects index) : base(false, Guid.NewGuid()) { fObjectIndex = index; IntPtr objectHandle = GDI32.GetStockObject((int)index); SetHandle(objectHandle); }
public static GDIStockObject GetStockObject(StockObjects index) { GDIStockObject anObject; // 1. Lookup the object in the existing stock object table if (gStockObjects.ContainsKey(index)) { anObject = gStockObjects[index]; return anObject; } // 2. create the object if it doesn't exist already anObject = new GDIStockObject(index); gStockObjects.Add(index, anObject); return anObject; }
public static extern IntPtr GetStockObject(StockObjects fnObject);
private static extern IntPtr GetStockObject(StockObjects fnObject);
public static IntPtr GetStockObject(StockObjects stockObject) => Gdi32.GetStockObject(stockObject);
internal static extern IntPtr GetStockObject(StockObjects fnObject);
public static extern IntPtr GetStockObject(StockObjects obj);
public static IntPtr GetStockObject(StockObjects stockObject) { return GetStockObject((int)stockObject); }
public static IntPtr GetStockObject(StockObjects fnObject) { NotImplemented(MethodBase.GetCurrentMethod()); return(IntPtr.Zero); }
public static extern VoidPtr GetStockObject(StockObjects fnObject);
static extern IntPtr GetStockObject( StockObjects stock_object);
// ******************************************* C# ENTRY POINTS // ********************************************** frame_region /// <summary> /// Draws a black border around the specified region /// </summary> /// <param name="graphics">the Graphics object on which to draw the frame</param> /// <param name="region">region around which to draw the frame</param> /// <param name="stockObjects">The stock objects.</param> public static void DrawBorderAroundRegion(this System.Drawing.Graphics graphics, Region region, StockObjects stockObjects) { var hregn = region.GetHrgn(graphics); var hdc = graphics.GetHdc(); FrameRgn(hdc, hregn, GetStockObject(stockObjects), 1, 1); graphics.ReleaseHdc(hdc); }
public static IntPtr GetStockObject(StockObjects stockObject) { return(GetStockObject((int)stockObject)); }