public FeatureList GetFeatureList() { if (null == dxf) throw new Exception("Dxf file has not been set."); FeatureList fList = new FeatureList(); foreach(var layer in dxf.Layers) { Feature feature = new Feature(); feature.Name = layer.Name; feature.Color = new ColorAsBrush ( layer.Color.R , layer.Color.G , layer.Color.B ); feature.FillColor = feature.Color; //feature.Style = layer.LineType; feature.Weight = layer.Lineweight.Value; feature.Printable = layer.Plot; fList.AddFeature(feature); } return fList; }
private Double getStrokeThickness(Feature itm) { const Double MAX_WT = 9.0; //int preWt = (itm.Weight == null) ? 0 : (int)itm.Weight; int preWt = (int) itm.Weight; Double wt = (preWt > MAX_WT) ? MAX_WT : preWt; wt = (wt / 2) + 0.5; wt /= 96.0; Double screenThickness = (itm.Thickness == null) ? 0.0 : (Double)itm.Thickness; screenThickness /= this.myCadViewPort.ScaleVector.x; Double retVal = (wt < screenThickness) ? screenThickness : wt; retVal *= this.myCadViewPort.ScaleVector.x; return retVal; }
private DoubleCollection getStrokeDashArray(Feature itm) { return null; }
private void add3Features(FeatureList aFL) { var f1 = new Feature(); f1.Name = "F1"; aFL.AddFeature(f1); f1 = new Feature(); f1.Name = "F2"; aFL.AddFeature(f1); f1 = new Feature(); f1.Name = "F3"; aFL.AddFeature(f1); }
private void setDefaultFeature() { DefaultFeature = Feature.Factory_NewFeature(); //DefaultFeature.Name = "Default"; Children.Add(DefaultFeature.Name, DefaultFeature); }
public void AddFeature(Feature ft) { this.Children.Add(ft.Name, ft); }
private void setUpFeaturesForTestingModel() { Feature ft = new Feature(); ft.Name = "RedThick"; ft.Color = (ColorAsBrush)WPFmedia.Brushes.Red; ft.Weight = 9; ft.Thickness = 1; ft.Style = 2; // Medium Dashed ft.Style = 0; //ft.DisplayPriority = 90; // uncomment and watch plot order change this.FeatureList.AddFeature(ft); ft = new Feature(); ft.Name = "BlueDashed"; ft.Color = (ColorAsBrush)WPFmedia.Brushes.Blue; ft.Weight = 1; ft.Style = 1; // Long Dashed ft.DisplayPriority = 10; this.FeatureList.AddFeature(ft); ft = new Feature(); ft.Name = "GreenDot"; ft.Color = (ColorAsBrush)WPFmedia.Brushes.Green; ft.Weight = 1; ft.Thickness = 2; ft.Style = 3; // Dots ft.Style = 0; ft.DisplayPriority = 10; ft.Transparency = 0.25; this.FeatureList.AddFeature(ft); }
static Feature() { staticDefault = new Feature(); }
public static void SetStaticDefault(Feature feature) { staticDefault = feature; }