public static PathCommand Parse(string sequence, PathLocationInfo pathLocationInfo = null) { PathCommand pathCommand = new PathCommand(); pathCommand.ParseCore(sequence); return(pathCommand); }
public Location(PointF location, PathCommandType commandType, PathLocationInfo locationInfo, bool useRelativeCoordinates) : this() { locationCore = location; pathLocationInfoCore = locationInfo; useRelativeCoordinatesCore = useRelativeCoordinates; CommandType = commandType; }
protected override void ParseCore(string[] coordinates, PathLocationInfo pathLocationInfo) { for (int i = 0, j = 0; i < coordinates.Length; i += 2, j++) { PointF point = new PointF(Convert.ToSingle(coordinates[i], CultureInfo.InvariantCulture), Convert.ToSingle(coordinates[i + 1], CultureInfo.InvariantCulture)); Location location = new Location(point, CommandType, pathLocationInfo, UseRelativeCoordinates); AddLocation(location); } }
protected override void ParseCore(string[] coordinates, PathLocationInfo pathLocationInfo) { foreach (string coordinate in coordinates) { PointF point = new PointF(Convert.ToSingle(coordinate, CultureInfo.InvariantCulture), 0); Location location = new Location(point, CommandType, pathLocationInfo, UseRelativeCoordinates); location.UnitType = LocationUnitType.Y; AddLocation(location); } }
protected override void ParseCore(string[] args, PathLocationInfo pathLocationInfo) { radiusCore.Width = Convert.ToSingle(args[0], CultureInfo.InvariantCulture); radiusCore.Height = Convert.ToSingle(args[1], CultureInfo.InvariantCulture); XAxisRotation = Convert.ToBoolean(Convert.ToInt32(args[2], CultureInfo.InvariantCulture), CultureInfo.InvariantCulture); LargeArcFlag = Convert.ToBoolean(Convert.ToInt32(args[3], CultureInfo.InvariantCulture), CultureInfo.InvariantCulture); SweepFlag = Convert.ToBoolean(Convert.ToInt32(args[4], CultureInfo.InvariantCulture), CultureInfo.InvariantCulture); PointF location = new PointF(Convert.ToSingle(args[5], CultureInfo.InvariantCulture), Convert.ToSingle(args[6], CultureInfo.InvariantCulture)); locationCore = new Location(location, CommandType, pathLocationInfo, UseRelativeCoordinates); }
protected virtual void ParseCore(string[] coordinates, PathLocationInfo pathLocationInfo) { }
public MoveToCommandArgs(PathCommandType commandType, Location[] locations, PathLocationInfo pathLocationInfo) : base(commandType) { locationsCore = locations.ToList(); PathLocationInfo = pathLocationInfo; }
public static PathCommandArgs Parse(PathCommandType commandType, string sequence, PathLocationInfo pathLocationInfo = null) { PathCommandArgs commandArgs = CreateInstance(commandType); commandArgs.PathLocationInfo = pathLocationInfo; commandArgs.UseRelativeCoordinates = Char.IsLower(sequence.First()); commandArgs.ParseCore(sequence.Substring(1), pathLocationInfo); return commandArgs; }
protected virtual void ParseCore(string sequence, PathLocationInfo pathLocationInfo) { string[] coordinates = sequence.Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); ParseCore(coordinates, pathLocationInfo); }
public static PathCommandArgs Parse(PathCommandType commandType, string sequence, PathLocationInfo pathLocationInfo = null) { PathCommandArgs commandArgs = CreateInstance(commandType); commandArgs.PathLocationInfo = pathLocationInfo; commandArgs.UseRelativeCoordinates = Char.IsLower(sequence.First()); commandArgs.ParseCore(sequence.Substring(1), pathLocationInfo); return(commandArgs); }
public void SetPathLocationInfo(PathLocationInfo pathLocationInfo) { pathLocationInfoCore = pathLocationInfo; }
protected override void ParseCore(string[] coordinates, PathLocationInfo pathLocationInfo) { foreach(string coordinate in coordinates) { PointF point = new PointF(Convert.ToSingle(coordinate, CultureInfo.InvariantCulture), 0); Location location = new Location(point, CommandType, pathLocationInfo, UseRelativeCoordinates); location.UnitType = LocationUnitType.Y; AddLocation(location); } }
public RenderedPathInfo(PathAppearance appearance, PathLocationInfo pathLocationInfo = null) { appearanceCore = appearance; pathCore = new GraphicsPath(); locationInfoCore = pathLocationInfo ?? new PathLocationInfo(); }
protected virtual Location CreateLocation(PathLocationInfo pathLocationInfo) { return(new Location(CommandType, pathLocationInfo, UseRelativeCoordinates)); }
protected override void ParseCore(string[] coordinates, PathLocationInfo pathLocationInfo) { for(int i = 0, j = 0; i < coordinates.Length; i += 2, j++) { PointF point = new PointF(Convert.ToSingle(coordinates[i], CultureInfo.InvariantCulture), Convert.ToSingle(coordinates[i + 1], CultureInfo.InvariantCulture)); Location location = new Location(point, CommandType, pathLocationInfo, UseRelativeCoordinates); AddLocation(location); } }
protected virtual Location CreateLocation(PathLocationInfo pathLocationInfo) { return new Location(CommandType, pathLocationInfo, UseRelativeCoordinates); }
public Location(PathCommandType commandType, PathLocationInfo locationInfo, bool useRelativeCoordinates) : this(PointF.Empty, commandType, locationInfo, useRelativeCoordinates) { }
protected virtual void ParseCore(string sequence, PathLocationInfo pathLocationInfo = null) { Type = GetPathCommandType(sequence.First()); Args = PathCommandArgs.Parse(Type, sequence); }
public static PathCommand Parse(string sequence, PathLocationInfo pathLocationInfo = null) { PathCommand pathCommand = new PathCommand(); pathCommand.ParseCore(sequence); return pathCommand; }