Exemplo n.º 1
0
 public GDIStockObject(StockObjects index)
     : base(false, Guid.NewGuid())
 {
     fObjectIndex = index;
     IntPtr objectHandle = GDI32.GetStockObject((int)index);
     SetHandle(objectHandle);
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public static extern IntPtr GetStockObject(StockObjects fnObject);
Exemplo n.º 4
0
 private static extern IntPtr GetStockObject(StockObjects fnObject);
Exemplo n.º 5
0
 public static IntPtr GetStockObject(StockObjects stockObject) => Gdi32.GetStockObject(stockObject);
 internal static extern IntPtr GetStockObject(StockObjects fnObject);
Exemplo n.º 7
0
 public static extern IntPtr GetStockObject(StockObjects fnObject);
Exemplo n.º 8
0
 public static extern IntPtr GetStockObject(StockObjects obj);
Exemplo n.º 9
0
 public static IntPtr GetStockObject(StockObjects stockObject)
 {
     return GetStockObject((int)stockObject);
 }
Exemplo n.º 10
0
 public static extern IntPtr GetStockObject(StockObjects obj);
Exemplo n.º 11
0
 public static IntPtr GetStockObject(StockObjects fnObject)
 {
     NotImplemented(MethodBase.GetCurrentMethod());
     return(IntPtr.Zero);
 }
Exemplo n.º 12
0
 public static extern VoidPtr GetStockObject(StockObjects fnObject);
Exemplo n.º 13
0
 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);
        }
Exemplo n.º 15
0
 public static IntPtr GetStockObject(StockObjects stockObject)
 {
     return(GetStockObject((int)stockObject));
 }