using System; using System.Collections.Generic; using System.Text; using System.Drawing; namespace FastReport.Utils { /// /// Provides a data for paint event. /// public class FRPaintEventArgs { private IGraphics graphics; private float scaleX; private float scaleY; private GraphicCache cache; /// /// Gets a Graphics object to draw on. /// public IGraphics Graphics { get { return graphics; } } /// /// Gets the X scale factor. /// public float ScaleX { get { return scaleX; } } /// /// Gets the Y scale factor. /// public float ScaleY { get { return scaleY; } } /// /// Gets the cache that contains graphics objects. /// public GraphicCache Cache { get { return cache; } } /// /// Initializes a new instance of the FRPaintEventArgs class with specified settings. /// /// IGraphicsRenderer object to draw on. /// X scale factor. /// Y scale factor. /// Cache that contains graphics objects. public FRPaintEventArgs(IGraphics g, float scaleX, float scaleY, GraphicCache cache) { graphics = g; this.scaleX = scaleX; this.scaleY = scaleY; this.cache = cache; } /// /// Initializes a new instance of the FRPaintEventArgs class with specified settings. /// /// Graphics object to draw on. /// X scale factor. /// Y scale factor. /// Cache that contains graphics objects. public FRPaintEventArgs(Graphics g, float scaleX, float scaleY, GraphicCache cache) : this(GdiGraphics.FromGraphics(g), scaleX, scaleY, cache) { } } }