/// <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) { paintContext.PopClip(); if (Pen != null) { Graphics g = paintContext.Graphics; g.DrawPath(Pen, PathReference); } }
protected override void Paint(PPaintContext paintContext) { Graphics g = paintContext.Graphics; g.DrawRectangle(Pens.Black, Bounds.X, Bounds.Y, Bounds.Width, Bounds.Height); float y = (float) Y + CalendarNode.TEXT_Y_OFFSET; g.DrawString(dayOfMonthString, CalendarNode.DEFAULT_FONT, Brush, (float) X + CalendarNode.TEXT_X_OFFSET, y); if (hasWidthFocus && hasHeightFocus) { paintContext.PushClip(new Region(Bounds)); for (int i = 0; i < lines.Count; i++) { y += 10; g.DrawString((String)lines[i], CalendarNode.DEFAULT_FONT, Brush, X + CalendarNode.TEXT_X_OFFSET, y); } paintContext.PopClip(); } }
/// <summary> /// Paint the camera's view through the view transform. /// </summary> /// <param name="paintContext">The paint context to use for painting this camera.</param> protected virtual void PaintTransformedView(PPaintContext paintContext) { paintContext.PushClip(new Region(Bounds)); paintContext.PushMatrix(viewMatrix); PaintCameraView(paintContext); PaintDebugInfo(paintContext); paintContext.PopMatrix(); paintContext.PopClip(); }