public void OpenWindow() { GraphicsProvider provider = new GraphicsProvider(); IDrawspace drawspace = provider.GetDrawspace(new Rect2D(0, 0, 800, 400)); Assert.True(true, "Opened window"); }
public override void PaintComponent(IDrawspace drawspace) { foreach (IComponent child in _children) { child.Paint(drawspace); } }
private void DoCanvasPaint(IDrawspace drawspace) { long currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; Update(currentTime - _lastPaintTime); _lastPaintTime = currentTime; Layout(); Paint(drawspace); }
public GUIImage(IDrawspace drawspace, IImage image, IRect2D srcRect = null) : base(drawspace) { _image = image; _sourceRect = srcRect != null ? srcRect : Drawspace.Provider.MakeRect2D( 0, 0, image.Size.X, image.Size.Y); _destRect = Drawspace.Provider.MakeRect2D(0, 0, image.Size.X, image.Size.Y); }
public void Paint(IDrawspace drawspace) { IMatrix2D copyXform = drawspace.Provider.CopyTransform(drawspace.PeekTransform()); copyXform.PreMultiply(LocalXform); drawspace.PushTransform(copyXform); drawspace.PushClip(LocalClip); PaintComponent(drawspace); drawspace.PopClip(); drawspace.PopTransform(); }
public Window(IDrawspace drawspace) : base(drawspace) // no parent { _drawspace = drawspace; drawspace.OnPaint += DoCanvasPaint; }
public abstract void PaintComponent(IDrawspace drawspace);
public AbstractComponent(IDrawspace drawspace) { LocalXform = drawspace.Provider.GetIdentityXForm(); LocalClip = drawspace.Provider.MakeRect2D( 0, 0, drawspace.Size.X, drawspace.Size.Y); }
public override void PaintComponent(IDrawspace drawspace) { drawspace.DrawImage(_image, _sourceRect, _destRect, _alpha); }
public override void PaintComponent(IDrawspace drawspace) { drawspace.DrawText(Text, CurrentFont); }
public AbstractContainer(IDrawspace drawspace) : base(drawspace) { }