/// <summary> /// Creates a new layer with bottom x axis and left y axis, which is not linked. /// </summary> public static void CreateNewLayerNormalBottomXLeftY(this GraphDocument doc) { var context = doc.GetPropertyHierarchy(); var location = new ItemLocationDirect { PositionX = RADouble.NewRel(HostLayer.DefaultChildLayerRelativePosition.X), PositionY = RADouble.NewRel(HostLayer.DefaultChildLayerRelativePosition.Y), SizeX = RADouble.NewRel(HostLayer.DefaultChildLayerRelativeSize.X), SizeY = RADouble.NewRel(HostLayer.DefaultChildLayerRelativeSize.Y) }; var newlayer = new XYPlotLayer(doc.RootLayer, location); doc.RootLayer.Layers.Add(newlayer); newlayer.CreateDefaultAxes(context); }
public ItemLocationDirect(ItemLocationDirect from) { CopyFrom(from); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ItemLocationDirect s = SDeserialize(o, info, parent); return(s); }
public ItemLocationDirectAutoSize(ItemLocationDirect from) { CopyFrom(from); }
public ItemLocationDirectAspectPreserving(ItemLocationDirect from) { CopyFrom(from); }
public IItemLocation ConvertToCurrentLocationVersion(PointD2D cachedLayerSize, PointD2D cachedLayerPosition) { var newLoc = new ItemLocationDirect(); switch (_layerWidthType) { case XYPlotLayerSizeType.AbsoluteValue: newLoc.SizeX = RADouble.NewAbs(_layerWidth); break; case XYPlotLayerSizeType.RelativeToGraphDocument: newLoc.SizeX = RADouble.NewRel(_layerWidth); break; default: newLoc.SizeX = RADouble.NewAbs(cachedLayerSize.X); break; } switch (_layerHeightType) { case XYPlotLayerSizeType.AbsoluteValue: newLoc.SizeY = RADouble.NewAbs(_layerHeight); break; case XYPlotLayerSizeType.RelativeToGraphDocument: newLoc.SizeY = RADouble.NewRel(_layerHeight); break; default: newLoc.SizeY = RADouble.NewAbs(cachedLayerSize.Y); break; } switch (_layerXPositionType) { case XYPlotLayerPositionType.AbsoluteValue: newLoc.PositionX = RADouble.NewAbs(_layerXPosition); break; case XYPlotLayerPositionType.RelativeToGraphDocument: newLoc.PositionX = RADouble.NewRel(_layerXPosition); break; default: newLoc.PositionX = RADouble.NewAbs(cachedLayerPosition.X); break; } switch (_layerYPositionType) { case XYPlotLayerPositionType.AbsoluteValue: newLoc.PositionY = RADouble.NewAbs(_layerYPosition); break; case XYPlotLayerPositionType.RelativeToGraphDocument: newLoc.PositionY = RADouble.NewRel(_layerYPosition); break; default: newLoc.PositionY = RADouble.NewAbs(cachedLayerPosition.Y); break; } newLoc.Rotation = _layerAngle; newLoc.ScaleX = newLoc.ScaleY = _layerScale; return(newLoc); }