public static D2DBitmap CreateBitmapFromGDIBitmap(D2DDevice device, System.Drawing.Bitmap bmp) { bool useAlphaChannel = (bmp.PixelFormat & System.Drawing.Imaging.PixelFormat.Alpha) == System.Drawing.Imaging.PixelFormat.Alpha; return(device.CreateBitmapFromGDIBitmap(bmp, useAlphaChannel)); }
internal D2DPen(D2DDevice Device, HANDLE handle, D2DColor color, D2DDashStyle dashStyle = D2DDashStyle.Solid, float[] customDashes = null, float dashOffset = 0f) : base(handle) { this.Device = Device; this.Color = color; this.DashStyle = dashStyle; this.CustomDashes = customDashes; this.DashOffset = dashOffset; }
public D2DGraphics(D2DDevice context) : this(context.Handle) { this.Device = context; }
public static D2DBitmap CreateBitmapFromGDIBitmap(D2DDevice device, System.Drawing.Bitmap bmp, bool useAlphaChannel) { HANDLE d2dbmp = D2D.CreateBitmapFromHBitmap(device.Handle, bmp.GetHbitmap(), useAlphaChannel); return(d2dbmp == HANDLE.Zero ? null : new D2DBitmap(d2dbmp)); }