Пример #1
0
        //****************************************************************
        // Painting Layers - Methods for painting the layers viewed by
        // the camera.
        //****************************************************************
        /// <summary>
        /// Overridden.  Paint this camera (default background color is white) and then paint
        /// the camera's view through the view transform.
        /// </summary>
        /// <param name="paintContext">The paint context to use for painting this camera.</param>
        protected override void Paint(PPaintContext paintContext)
        {
            base.Paint(paintContext);
            RectangleF b = this.Bounds;
            Rectangle iBounds = new Rectangle((int)b.X, (int)b.Y, (int)b.Width, (int)b.Height);

            paintContext.PushClip(new Region(iBounds));
            paintContext.PushTransform(viewMatrix);

            PaintCameraView(paintContext);
            PaintDebugInfo(paintContext);

            paintContext.PopTransform(viewMatrix);
            paintContext.PopClip(new Region(iBounds));
        }
Пример #2
0
        /// <summary>
        /// Overridden.  Renders the fill for this node and then pushes the clip onto the
        /// paint context, so that when this node's children are rendered they will be
        /// clipped accordingly.
        /// </summary>
        /// <param name="paintContext">
        /// The paint context to use for painting this node.
        /// </param>
        protected override void Paint(PPaintContext paintContext)
        {
            //Brush b = Brush;
            //if (b != null) {
            //	Graphics g = paintContext.Graphics;
            //	g.FillPath(b, this.PathReference);
            //}

            base.Paint(paintContext);

            TEMP_REGION.MakeInfinite();
            TEMP_REGION.Intersect(new Region(new Rectangle((int)Bounds.X, (int)Bounds.Y, (int)Bounds.Width, (int)Bounds.Height)));
            paintContext.PushClip(TEMP_REGION);
        }