示例#1
0
        public static void PaintParentBackground(this IStyleRenderer styleRenderer, Graphics graphics, Rectangle rectangle, Rectangle parentRectangle, IRuleset parentRuleset)
        {
            Rectangle drawRect = new Rectangle(parentRectangle.X + rectangle.X, parentRectangle.Y + rectangle.Y, parentRectangle.Width, parentRectangle.Height);

            Region oldClippingRegion = graphics.Clip;
            Region clippingRegion    = new Region();

            clippingRegion.Intersect(oldClippingRegion);
            clippingRegion.Intersect(rectangle);

            graphics.SetClip(clippingRegion, CombineMode.Replace);
            graphics.TranslateTransform(-rectangle.X, -rectangle.Y);

            styleRenderer.PaintBackground(graphics, drawRect, parentRuleset);

            graphics.TranslateTransform(rectangle.X, rectangle.Y);
            graphics.SetClip(oldClippingRegion, CombineMode.Replace);
        }
示例#2
0
        // Public members

        public ToolTipRenderer(IStyleSheet styleSheet, IStyleRenderer styleRenderer)
        {
            this.styleSheet    = styleSheet;
            this.styleRenderer = styleRenderer;
        }
 public DataGridViewRenderer(IStyleSheet styleSheet, IStyleRenderer styleRenderer)
 {
     this.styleSheet    = styleSheet;
     this.styleRenderer = styleRenderer;
 }
 public ControlPaintArgs(Control control, Graphics graphics, IStyleSheet styleSheet, IStyleRenderer styleRenderer, bool parentDraw)
 {
     this.Control       = control;
     this.Graphics      = graphics;
     this.StyleSheet    = styleSheet;
     this.StyleRenderer = styleRenderer;
     this.ParentDraw    = parentDraw;
 }
示例#5
0
        // Public members

        public ListViewRenderer(IStyleSheet styleSheet, IStyleRenderer styleRenderer)
        {
            this.styleSheet    = styleSheet;
            this.styleRenderer = styleRenderer;
        }