public override AstStatement Clone() => CopyValuesTo(new AstConstantDeclaration( Pattern.Clone(), TypeExpr?.Clone(), Initializer.Clone(), Documentation, Directives?.Select(d => d.Clone()).ToList()));
public override Element Clone() => new PatternElement((Pattern)pattern.Clone()) { Next = cloneNext(), Alternate = cloneAlternate(), Replacement = cloneReplacement(), ID = CompilerState.ObjectID() };
/// <inheritdoc/> public override object Clone() { var res = (WarpedLineSymbolizer)MemberwiseClone(); res.Fill = (Brush)Fill.Clone(); res.Line = (Pen)Line.Clone(); res.Pattern = (GraphicsPath)Pattern.Clone(); return(res); }
/// <summary> /// Creates a deep copy /// </summary> /// <returns></returns> public override SmithingRecipe Clone() { SmithingRecipe recipe = new SmithingRecipe(); recipe.Pattern = (string[][])Pattern.Clone(); recipe.Ingredient = Ingredient.Clone(); recipe.Output = Output.Clone(); recipe.Name = Name; recipe.RecipeId = RecipeId; return(recipe); }
/// <summary> /// Clones this instance. /// </summary> /// <returns> /// A new object that is a copy of this instance. /// </returns> public XlsxCellContentOptions Clone() { var cloned = (XlsxCellContentOptions)MemberwiseClone(); if (Merge != null) { cloned.Merge = Merge.Clone(); } if (Pattern != null) { cloned.Pattern = Pattern.Clone(); } if (Alignment != null) { cloned.Alignment = Alignment.Clone(); } return(cloned); }
/// <summary> /// Function that actually renders the linestring /// </summary> /// <param name="map">The map</param> /// <param name="lineString">The line string to symbolize.</param> /// <param name="graphics">The graphics</param> protected override void OnRenderInternal(Map map, ILineString lineString, Graphics graphics) { var clonedPattern = (GraphicsPath)Pattern.Clone(); var graphicsPath = WarpPathToPath.Warp(LineStringToPath(lineString, map), clonedPattern, true, Interval); if (graphicsPath == null) { return; } // Fill? if (Fill != null) { graphics.FillPath(Fill, graphicsPath); } // Outline if (Line != null) { graphics.DrawPath(Line, graphicsPath); } }
/// <summary> /// Function to symbolize the graphics path to the graphics object /// </summary> /// <param name="g">The graphics object</param> /// <param name="paths">The paths</param> public void SymbolizePaths(Graphics g, IEnumerable <GraphicsPath> paths) { foreach (var graphicsPath in paths) { var clonedPattern = (GraphicsPath)Pattern.Clone(); var warpedPath = WarpPathToPath.Warp(graphicsPath, clonedPattern, true, Interval); if (warpedPath == null) { continue; } if (Fill != null) { g.FillPath(Fill, warpedPath); } if (Line != null) { g.DrawPath(Line, warpedPath); } } }
public override Element Clone() => clone(new ArbNoElement((Pattern)pattern.Clone()));
public Pattern Clone(Dictionary <string, Ty> newTypes) => new OrTypePattern(VariantName, InnerValue.Clone(newTypes));
public override Element Clone() => clone(new CountElement(count, (Pattern)pattern.Clone()));
public override AstStatement Clone() => CopyValuesTo(new AstAssignment(Pattern.Clone(), Value.Clone(), Operator));