/// <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); } TEMP_REGION.MakeInfinite(); TEMP_REGION.Intersect(PathReference); paintContext.PushClip(TEMP_REGION); }
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(); }