Example #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));
        }
Example #2
0
        /// <summary>
        /// Overridden.  Pops the clip from the paint context and then renders the outline
        /// of this node.
        /// </summary>
        /// <param name="paintContext">
        /// The paint context to use for painting this node.
        /// </param>
        protected override void PaintAfterChildren(PPaintContext paintContext)
        {
            TEMP_REGION.MakeInfinite();
            TEMP_REGION.Intersect(new Rectangle((int)Bounds.X, (int)Bounds.Y, (int)Bounds.Width, (int)Bounds.Height));
            paintContext.PopClip(TEMP_REGION);

            base.PaintAfterChildren(paintContext);
            //if (Pen != null) {
            //	Graphics g = paintContext.Graphics;
            //	g.DrawPath(Pen, PathReference);
            //}
        }