public static void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, IPlotArea layer, PlotItemCollection coll) { for (int i = coll.Count - 1; i >= 0; --i) { coll[i].Paint(g, paintContext, layer, i == coll.Count - 1 ? null : coll[i + 1], i == 0 ? null : coll[i - 1]); } }
public override void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext context, IPlotArea layer, IGPlotItem previousPlotItem, IGPlotItem nextPlotItem) { if (null != _plotStyle) { _plotStyle.Paint(g, layer, _plotData); } }
public void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, bool bForPreview) { //_isStructureInSync = false; _isMeasureInSync = false; // Change: interpret text every time in order to update plot items and \ID if (!_isStructureInSync) { // this.Interpret(g); InterpretText(); _isStructureInSync = true; _isMeasureInSync = false; } using (var fontCache = new FontCache()) { if (!_isMeasureInSync) { // this.MeasureStructure(g, obj); MeasureGlyphs(g, fontCache, paintContext); MeasureBackground(g, _rootNode.SizeX, _rootNode.SizeY, _rootNode.SizeZ); _isMeasureInSync = true; } _cachedSymbolPositions.Clear(); var gs = g.SaveGraphicsState(); var bounds = Bounds; var transformmatrix = Matrix4x3.NewScalingShearingRotationDegreesTranslation( ScaleX, ScaleY, ScaleZ, ShearX, ShearY, ShearZ, RotationX, RotationY, RotationZ, _location.AbsolutePivotPositionX, _location.AbsolutePivotPositionY, _location.AbsolutePivotPositionZ); transformmatrix.TranslatePrepend(bounds.X, bounds.Y, bounds.Z); if (!bForPreview) { TransformGraphics(g); g.TranslateTransform(bounds.X, bounds.Y, bounds.Z); } // first of all paint the background PaintBackground(g); var dc = new DrawContext { FontCache = fontCache, bForPreview = bForPreview, LinkedObject = Altaxo.Main.AbsoluteDocumentPath.GetRootNodeImplementing <HostLayer>(this), transformMatrix = transformmatrix, _cachedSymbolPositions = _cachedSymbolPositions }; DrawGlyphs(g, dc, _cachedTextOffset.X, _cachedTextOffset.Y, _cachedTextOffset.Z); g.RestoreGraphicsState(gs); } }
public void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, IPlotArea layer) { for (int i = 0; i < _axisStyles.Count; ++i) { _axisStyles[i].Paint(g, paintContext, layer); } }
public void PaintTitle(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, IPlotArea layer) { if (IsTitleEnabled) { _axisTitle.Paint(g, paintContext); } }
public void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, IPlotArea layer, Func <CSLineID, CSAxisInformation> GetAxisStyleInformation) { PaintLine(g, layer); PaintMajorLabels(g, layer); PaintMinorLabels(g, layer); PaintTitle(g, paintContext, layer); }
private void MeasureGlyphs(IGraphicsContext3D g, FontCache cache, Altaxo.Graph.IPaintContext paintContext) { var mc = new MeasureContext { FontCache = cache, LinkedObject = Altaxo.Main.AbsoluteDocumentPath.GetRootNodeImplementing <HostLayer>(this), TabStop = Glyph.MeasureString("MMMM", _font).X }; if (null != _rootNode) { _rootNode.Measure(mc, 0); } }
/// <summary> /// This paints the plot to the layer. /// </summary> /// <param name="g">The graphics context.</param> /// <param name="context">The painting context.</param> /// <param name="layer">The plot layer.</param> /// <param name="previousPlotItem">Previous plot item.</param> /// <param name="nextPlotItem">Next plot item.</param> /// <returns>A data object, which can be used by the next plot item for some styles (like fill style).</returns> public abstract void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext context, IPlotArea layer, IGPlotItem previousPlotItem, IGPlotItem nextPlotItem);
/// <summary> /// Called before painting takes place. /// </summary> /// <param name="context">The painting context.</param> public virtual void PaintPreprocessing(Altaxo.Graph.IPaintContext context) { }
public override void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext) { Paint(g, paintContext, false); }
public void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext paintContext, IPlotArea layer) { Paint(g, paintContext, layer, layer.CoordinateSystem.GetAxisStyleInformation); }
/// <summary> /// Paint the object in the graphics context. /// </summary> /// <param name="g">Graphics context.</param> /// <param name="context">Additional information used to draw the object.</param> public abstract void Paint(IGraphicsContext3D g, Altaxo.Graph.IPaintContext context);