public override void RenderStaticElements(GaugeGraphics g) { if (base.Visible) { g.StartHotRegion(this); base.BackFrame.RenderFrame(g); GraphicsState gstate = g.Save(); if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { GraphicsPath graphicsPath = null; try { graphicsPath = base.BackFrame.GetBackPath(g); g.SetClip(graphicsPath, CombineMode.Intersect); } finally { if (graphicsPath != null) { graphicsPath.Dispose(); } } } this.Common.GaugeCore.HotRegionList.SetHotRegion(this, g.GetAbsolutePoint(this.PivotPoint.ToPoint()), base.BackFrame.GetFramePath(g, 0f)); g.EndHotRegion(); g.GetAbsoluteRectangle(new RectangleF(0f, 0f, 100f, 100f)); this.RenderStaticShadows(g); foreach (CircularRange range in this.Ranges) { range.Render(g); } foreach (CircularScale scale in this.Scales) { scale.RenderStaticElements(g); } foreach (CircularPointer pointer in this.Pointers) { pointer.ResetCachedXamlRenderer(); } if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { g.Restore(gstate); } } }
public override void RenderDynamicElements(GaugeGraphics g) { if (base.Visible) { if (this.Common != null && this.Common.GaugeCore.renderContent == RenderContent.Dynamic) { this.AbsoluteSize = g.GetAbsoluteSize(base.Size); } GraphicsState gstate = g.Save(); if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { GraphicsPath graphicsPath = null; try { graphicsPath = ((base.BackFrame.FrameStyle != 0) ? base.BackFrame.GetBackPath(g) : base.BackFrame.GetFramePath(g, 0f)); g.SetClip(graphicsPath, CombineMode.Intersect); } finally { if (graphicsPath != null) { graphicsPath.Dispose(); } } } this.RenderDynamicShadows(g); foreach (LinearPointer pointer in this.Pointers) { pointer.Render(g); } foreach (LinearScale scale in this.Scales) { scale.RenderDynamicElements(g); } if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { g.Restore(gstate); } base.BackFrame.RenderGlassEffect(g); this.RenderTopImage(g); } }
public override void RenderStaticElements(GaugeGraphics g) { if (base.Visible) { this.AbsoluteSize = g.GetAbsoluteSize(base.Size); g.StartHotRegion(this); base.BackFrame.RenderFrame(g); GraphicsState gstate = g.Save(); if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { GraphicsPath graphicsPath = null; try { graphicsPath = ((base.BackFrame.FrameStyle != 0) ? base.BackFrame.GetBackPath(g) : base.BackFrame.GetFramePath(g, 0f)); g.SetClip(graphicsPath, CombineMode.Intersect); } finally { if (graphicsPath != null) { graphicsPath.Dispose(); } } } this.Common.GaugeCore.HotRegionList.SetHotRegion(this, PointF.Empty, base.BackFrame.GetFramePath(g, 0f)); g.EndHotRegion(); this.RenderStaticShadows(g); foreach (LinearRange range in this.Ranges) { range.Render(g); } foreach (LinearScale scale in this.Scales) { scale.RenderStaticElements(g); } if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { g.Restore(gstate); } } }
internal override void RenderDynamicElements(GaugeGraphics g) { if (!base.Visible) { return; } GraphicsState gstate = g.Save(); if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { GraphicsPath graphicsPath = null; try { graphicsPath = ((base.BackFrame.FrameStyle != 0) ? base.BackFrame.GetBackPath(g) : base.BackFrame.GetFramePath(g, 0f)); g.SetClip(graphicsPath, CombineMode.Intersect); } finally { graphicsPath?.Dispose(); } } RenderDynamicShadows(g); foreach (Knob knob in Knobs) { knob.Render(g); } foreach (CircularPointer pointer in Pointers) { pointer.Render(g); } foreach (CircularScale scale in Scales) { scale.RenderDynamicElements(g); } if (base.ClipContent && base.BackFrame.FrameStyle != 0 && base.BackFrame.Image == string.Empty) { g.Restore(gstate); } base.BackFrame.RenderGlassEffect(g); RenderTopImage(g); }