public PixelFarm.Drawing.RectangleF GetBounds() { if (_cacheBoundEval) { return(_cacheBounds); } if (_figures != null) { PixelFarm.Drawing.RectangleF bounds = new Drawing.RectangleF(); if (_figures.FigureCount > 0) { bounds = _figures[0].GetBounds(); //start for (int i = 1; i < _figures.FigureCount; ++i) { bounds = PixelFarm.Drawing.RectangleF.Union(bounds, _figures[i].GetBounds()); } } _cacheBoundEval = true; return(_cacheBounds = bounds); } else { //single figure _cacheBoundEval = true; return(_cacheBounds = _figure.GetBounds()); } }
public void DrawImage(GLBitmap bmp, Drawing.RectangleF srcRect, float x, float y, float w, float h) { if (bmp.IsBigEndianPixel) { glesTextureShader.Render(bmp, x, y, w, h); } else { gdiImgTextureShader.Render(bmp, x, y, w, h); } }
public override void DrawRow(int row, Drawing.RectangleF clipRect) { bool shouldDraw = true; using (var graphics = Graphics.FromHwnd(this.Handle)) { var events = new DrawItemEventArgs(graphics, this.Font.ToFont(), Rectangle.Round(clipRect), row, getState(row)); if (Host is ListBox) { ((ListBox)Host).DrawItemInternal(events); } shouldDraw = !events.Handled; } if (shouldDraw) { base.DrawRow(row, clipRect); } }
public static RectangleF AsRectangleF(this Drawing.RectangleF target) { return(new RectangleF(target.Left, target.Top, Math.Abs(target.Width), Math.Abs(target.Height))); }
public NativeGraphicsView(Drawing.RectangleF frame, IDrawable drawable = null, IGraphicsRenderer renderer = null) : base(frame) { Drawable = drawable; Renderer = renderer; BackgroundColor = UIColor.White; }
public Metafile(System.IO.Stream stream, System.IntPtr ptr, Drawing.RectangleF rect, MetafileFrameUnit unit) { throw new NotImplementedException(); }