//**************************************************************** // 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)); }
/// <summary> /// Paint this node and all of its descendents. /// </summary> /// <param name="paintContext">The paint context to use for painting this node.</param> /// <remarks> /// <b>Notes to Inheritors:</b> Most subclasses do not need to override this method, /// they should override <c>paint</c> or <c>paintAfterChildren</c> instead. /// </remarks> public virtual void FullPaint(PPaintContext paintContext) { if (Visible && FullIntersects(paintContext.LocalClip)) { paintContext.PushTransform(matrix); //paintContext.PushTransparency(transparency); if (!Occluded) { Paint(paintContext); } int count = ChildrenCount; for (int i = 0; i < count; i++) { children[i].FullPaint(paintContext); } PaintAfterChildren(paintContext); //paintContext.popTransparency(transparency); paintContext.PopTransform(matrix); } }