private void RenderErrorMarks(Cairo.Context context, Point scale, MarkerStyle style, double size, List <double> vals, int direction) { if (vals == null || vals.Count != Count) { return; } context.Save(); if (d_errorColor != null) { d_errorColor.Set(context); } else if (Color != null) { Color.Set(context); } context.LineWidth = LineWidth; Marker.Renderer renderer = Marker.Lookup(style); for (int i = 0; i < Count; ++i) { Point pt = this[i].Copy(); pt.Y += direction * vals[i]; renderer(context, scale, pt, size, LineWidth); } context.Restore(); }
public static CIMMarker CreateMarker(CIMColor color, double size, MarkerStyle style) { var geometry = CreateMarkerGeometry(style); var symbol = CreatePolygonSymbol(color); var graphic = new CIMMarkerGraphic { Geometry = geometry, Symbol = symbol }; var marker = new CIMVectorMarker(); marker.ColorLocked = false; marker.Enable = true; marker.Size = size >= 0 ? size : DefaultMarkerSize; marker.AnchorPointUnits = SymbolUnits.Relative; marker.BillboardMode3D = BillboardMode.FaceNearPlane; marker.DominantSizeAxis3D = DominantSizeAxis.Y; marker.ScaleSymbolsProportionally = true; marker.RespectFrame = true; marker.MarkerGraphics = new[] { graphic }; marker.Frame = style == MarkerStyle.Circle ? GeometryFactory.CreateEnvelope(-5, -5, 5, 5) : graphic.Geometry.Extent; return(marker); }
public DataXY( double[] Ys, double[] Xs, float lineWidth = 1, Color?lineColor = null, LineStyle lineStyle = LineStyle.solid, float markerSize = 3, Color?markerColor = null, MarkerStyle markerStyle = MarkerStyle.circleSolid ) { this.Xs = Xs; this.Ys = Ys; this.lineWidth = lineWidth; this.lineStyle = lineStyle; if (lineColor == null) { lineColor = Color.Red; } this.lineColor = (Color)lineColor; this.markerSize = markerSize; if (markerColor == null) { markerColor = Color.Red; } this.markerColor = (Color)markerColor; this.markerStyle = markerStyle; }
public static void DrawMarker(CGContext context, CGPoint position, MarkerStyle markerStyle) { markerStyle.Color.SetFill(); var markerRect = new CGRect(new CGPoint(position.X + markerStyle.Offset.X - markerStyle.Size.Width / 2f, position.Y + markerStyle.Offset.Y - markerStyle.Size.Height / 2f), markerStyle.Size); UIGraphics.PushContext(context); UIBezierPath path = null; switch (markerStyle.Type) { case MarkerStyle.MarkerType.Oval: path = UIBezierPath.FromOval(markerRect); break; case MarkerStyle.MarkerType.Rect: path = UIBezierPath.FromRect(markerRect); break; } path.Fill(); UIGraphics.PopContext(); }
private void mapControl_Click(object sender, EventArgs e) { if (cboxEnableLineDraw.Checked) { if (bingLine.Count == 0) { mapControl.Markers.Clear(); } var coord = mapControl.Mouse; bingLine.Add(coord); mapControl.Invalidate(); lblPoints.Text = bingLine.Count.ToString(); { // Create marker's location point var point = coord; var style = new MarkerStyle(8); // Create marker instance: specify location on the map, drawing style, and label var marker = new Marker(point, style, bingLine.Count.ToString()); // Add marker to the map mapControl.Markers.Add(marker); mapControl.Invalidate(); } } }
protected virtual void DrawMarkers(CGContext context, List <CGPoint> points, MarkerStyle markerStyle) { foreach (var point in points) { DrawMarker(context, point, markerStyle); } }
public static Renderer Lookup(MarkerStyle style) { switch (style) { case MarkerStyle.Circle: return(RenderCircle); case MarkerStyle.FilledCircle: return(RenderFilledCircle); case MarkerStyle.FilledSquare: return(RenderFilledSquare); case MarkerStyle.Square: return(RenderSquare); case MarkerStyle.Cross: return(RenderCross); case MarkerStyle.Triangle: return(RenderTriangle); case MarkerStyle.FilledTriangle: return(RenderFilledTriangle); case MarkerStyle.Dash: return(RenderDash); case MarkerStyle.None: return(null); default: throw new NotImplementedException(); } }
public CustomTickMark(object parent, MarkerStyle shape, float length, float width) : this(parent) { this.shape = shape; this.length = length; this.width = width; }
void AddPinTo(MapPos position) { // 1. Initialize a local vector data source LocalVectorDataSource vectorDataSource1 = new LocalVectorDataSource(BaseProjection); // Initialize a vector layer with the previous data source VectorLayer vectorLayer1 = new VectorLayer(vectorDataSource1); // Add the previous vector layer to the map MapView.Layers.Add(vectorLayer1); // Set visible zoom range for the vector layer vectorLayer1.VisibleZoomRange = new MapRange(0, 18); // Create marker style Carto.Graphics.Bitmap markerBitmap = BitmapUtils.CreateBitmapFromUIImage(UIImage.FromFile("marker.png")); MarkerStyleBuilder markerStyleBuilder = new MarkerStyleBuilder(); markerStyleBuilder.Bitmap = markerBitmap; markerStyleBuilder.Size = 30; MarkerStyle sharedMarkerStyle = markerStyleBuilder.BuildStyle(); // 3. Add marker MapPos markerPos = MapView.Options.BaseProjection.FromWgs84(position); Marker marker1 = new Marker(markerPos, sharedMarkerStyle); vectorDataSource1.Add(marker1); // Animate map to the marker MapView.SetFocusPos(markerPos, 1); MapView.SetZoom(12, 1); }
// Token: 0x060032CF RID: 13007 RVA: 0x000E4924 File Offset: 0x000E2B24 internal static string MarkerStyleToOldRTFString(MarkerStyle ms) { switch (ms) { case MarkerStyle.MarkerArabic: break; case MarkerStyle.MarkerUpperRoman: return("\\pnlvlbody\\pnucrm"); case MarkerStyle.MarkerLowerRoman: return("\\pnlvlbody\\pnlcrm"); case MarkerStyle.MarkerUpperAlpha: return("\\pnlvlbody\\pnucltr"); case MarkerStyle.MarkerLowerAlpha: return("\\pnlvlbody\\pnlcltr"); case MarkerStyle.MarkerOrdinal: return("\\pnlvlbody\\pnord"); case MarkerStyle.MarkerCardinal: return("\\pnlvlbody\\pncard"); default: if (ms == MarkerStyle.MarkerBullet) { return("\\pnlvlblt"); } break; } return("\\pnlvlbody\\pndec"); }
/// <summary> /// convert marker style into bitmap /// </summary> /// <param name="marker">marker with style property</param> /// <returns>bitmap according to style</returns> /// <remarks>the bitmap will be loaded from ILNumerics.Drawing ressources. For marker style 'bitmap' /// the bitmap referenced in the marker will be returned.</remarks> public static Bitmap BitmapFromStyle(MarkerStyle style) { switch (style) { case MarkerStyle.Circle: return(Resources.Markers.Circle25x25); case MarkerStyle.Diamond: return(Resources.Markers.Diamond25x25); case MarkerStyle.TriangleUp: return(Resources.Markers.TriangleUp25x25); case MarkerStyle.TriangleDown: return(Resources.Markers.TriangleDown25x25); case MarkerStyle.TriangleLeft: return(Resources.Markers.TriangleLeft25x25); case MarkerStyle.TriangleRight: return(Resources.Markers.TriangleRight25x25); case MarkerStyle.Plus: return(Resources.Markers.Plus25x25); case MarkerStyle.Cross: return(Resources.Markers.Cross25x25); default: throw new NotImplementedException("ILStyledMarker: marker style not supported!"); } return(null); }
public Form1() { InitializeComponent(); //Initialize the list of wanted columns wantedcolumns = new List<Column>(); //values for the last measured result XmlManager<DataCol> columnloader = new XmlManager<DataCol>(); datacolumns = columnloader.Load("Content/XMLFile1.xml"); realpowerdict = new Dictionary<string, Column>(); //columnobjectlist = new List<Baselist>(); colobjinterflistbl = new List<IBaselist>();//! colobjinterflist = new List<IBaselist>();//! //diff variable here baseline values and loaders XmlManager<DataCol> columnloaderbl = new XmlManager<DataCol>(); datacolumnsbl = columnloaderbl.Load("Content/XMLFile1.xml"); realpowerdictbl = new Dictionary<string, Column>(); wantedcolumnsbl = new List<Column>(); phasebuttonarray = new Button[] { button6, button7, button8, button9, button10, button11, button12 }; phasebuttonlist = new List<Button>(phasebuttonarray); phasemarkerstyles = new MarkerStyle[] { MarkerStyle.Circle, MarkerStyle.Cross, MarkerStyle.Diamond, MarkerStyle.Square, MarkerStyle.Triangle, MarkerStyle.Star4, MarkerStyle.Star10 }; phasemarkerlist = new List<MarkerStyle>(phasemarkerstyles); //some files to play with should remove/make another plan later filenamedata = "C:/values/2015y09m24d_13h35m42s_SN121538001575_S230_60_LN_LoL_HiL_119.csv";//some test files populatedatatestunit(filenamedata); //****************************************populate the diff data****************************************************** filenamebl = "C:/values/2015y09m24d_13h35m42s_SN121538001575_S230_60_LN_LoL_HiL_119.csv";//some test files populatedatabaseline(filenamebl); //************************************************ //test for some answers Richtextedit(); setupploatarea(); //plotIdc(); this.textBox1.Text = "0°"; }
protected PointerBase(MarkerStyle markerStyle, float markerLength, float width, GradientType fillGradientType, Color fillColor, Color fillGradientEndColor, bool interactive) : this(markerStyle, markerLength, width, fillGradientType) { this.fillColor = fillColor; this.fillGradientEndColor = fillGradientEndColor; this.interactive = interactive; }
public static Marker AddMarkerToPosition(this MapView map, MapPos position) { // Initialize a local vector data source Projection projection = map.Options.BaseProjection; LocalVectorDataSource datasource = new LocalVectorDataSource(projection); // Initialize a vector layer with the previous data source VectorLayer layer = new VectorLayer(datasource); // Add layer to map map.Layers.Add(layer); // Set marker style MarkerStyleBuilder builder = new MarkerStyleBuilder(); builder.Size = 20; builder.Color = new Carto.Graphics.Color(0, 255, 0, 255); MarkerStyle style = builder.BuildStyle(); // Create marker and add it to the source Marker marker = new Marker(position, style); datasource.Add(marker); return(marker); }
/// <summary> /// Default Constructor. /// </summary> public SpikeRemoval() { //Default removed point style to a diamond. myRemovedPointStyle = MarkerStyle.Diamond; //Default labels to off. mySetCutoffLabels = false; }
protected PointerBase(MarkerStyle markerStyle, float markerLength, float width, GradientType fillGradientType) : this() { this.markerStyle = markerStyle; this.markerLength = markerLength; this.width = width; this.fillGradientType = fillGradientType; }
public LinearPointer(object parent) : base(parent) { this.markerStyle = MarkerStyle.Triangle; this.markerLength = 20f; this.width = 20f; this.fillGradientType = GradientType.DiagonalLeft; }
protected void Page_Load(object sender, System.EventArgs e) { // Set Marker shape to image if (Shape.SelectedItem.Value == "Image") { if (!ApplyToPoint.Checked) { Chart1.Series["Default"].MarkerImage = "Face.bmp"; Chart1.Series["Default"].MarkerImageTransparentColor = Color.White; } else { Chart1.Series["Default"].Points[2].MarkerImage = "Face.bmp"; Chart1.Series["Default"].Points[2].MarkerImageTransparentColor = Color.White; } // Disable color and size controls MarkerSize.Enabled = false; MarkerColor.Enabled = false; MarkerBorderColor.Enabled = false; Dropdownlist1.Enabled = false; } // Set "bubble" series shape else { if (!ApplyToPoint.Checked) { Chart1.Series["Default"].MarkerStyle = (MarkerStyle)MarkerStyle.Parse(typeof(MarkerStyle), Shape.SelectedItem.Value); } else { Chart1.Series["Default"].Points[2].MarkerStyle = (MarkerStyle)MarkerStyle.Parse(typeof(MarkerStyle), Shape.SelectedItem.Value); } // Enable color and size controls MarkerSize.Enabled = true; MarkerColor.Enabled = true; MarkerBorderColor.Enabled = true; Dropdownlist1.Enabled = true; } if (!ApplyToPoint.Checked) { Chart1.Series["Default"].MarkerSize = Int32.Parse(MarkerSize.SelectedItem.Text); Chart1.Series["Default"].MarkerColor = Color.FromName(MarkerColor.SelectedItem.Value); Chart1.Series["Default"].MarkerBorderColor = Color.FromName(MarkerBorderColor.SelectedItem.Value); Chart1.Series["Default"].MarkerBorderWidth = Int32.Parse(Dropdownlist1.SelectedItem.ToString()); } else { Chart1.Series["Default"].Points[2].MarkerSize = Int32.Parse(MarkerSize.SelectedItem.Text); Chart1.Series["Default"].Points[2].MarkerColor = Color.FromName(MarkerColor.SelectedItem.Value); Chart1.Series["Default"].Points[2].MarkerBorderColor = Color.FromName(MarkerBorderColor.SelectedItem.Value); Chart1.Series["Default"].Points[2].MarkerBorderWidth = Int32.Parse(Dropdownlist1.SelectedItem.ToString()); } }
protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); AddOnlineBaseLayer(CartoBaseMapStyle.CartoBasemapStylePositron); // read json from assets and add to map string json; using (System.IO.StreamReader sr = new System.IO.StreamReader(Assets.Open("cities15000.geojson"))) { json = sr.ReadToEnd(); } // Initialize a local vector data source LocalVectorDataSource source = new LocalVectorDataSource(BaseProjection); // Initialize a vector layer with the previous data source ClusteredVectorLayer layer = new ClusteredVectorLayer(source, new MyClusterElementBuilder(this)); layer.MinimumClusterDistance = 50; new System.Threading.Thread((obj) => { // Create a basic style, as the ClusterElementBuilder will set the real style var markerStyleBuilder = new MarkerStyleBuilder(); markerStyleBuilder.Size = 14; MarkerStyle style = markerStyleBuilder.BuildStyle(); // Read GeoJSON, parse it using SDK GeoJSON parser GeoJSONGeometryReader reader = new GeoJSONGeometryReader(); // Set target projection to base (mercator) reader.TargetProjection = BaseProjection; Alert("Starting load from .geojson"); // Read features from local asset FeatureCollection features = reader.ReadFeatureCollection(json); Alert("Finished load from .geojson"); VectorElementVector elements = new VectorElementVector(); for (int i = 0; i < features.FeatureCount; i++) { // This data set features point geometry, // however, it can also be LineGeometry or PolygonGeometry PointGeometry geometry = (PointGeometry)features.GetFeature(i).Geometry; elements.Add(new Marker(geometry, style)); } source.AddAll(elements); Alert("Clustering started. Please wait..."); // Add the clustered vector layer to the map MapView.Layers.Add(layer); }).Start(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { startDate.Value = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"); endDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); BindCustomerDDL(); var customerId = Request.QueryString["CustomerId"]; if (!string.IsNullOrEmpty(customerId)) { ddlCustomer.SelectedValue = customerId; } } DataTable dt = GetExpenseTrendData(); int poinsCount = dt.Rows.Count; decimal[] percentValues = new decimal[poinsCount]; string[] xValues = new string[poinsCount]; int[] yValues = new int[poinsCount]; int sumY = 0; for (int i = 0; i < poinsCount; i++) { yValues[i] = Convert.ToInt32(dt.Rows[i]["YVALUE"]); xValues[i] = "" + dt.Rows[i]["XVALUE"]; sumY += yValues[i]; } sumY = sumY == 0 ? 1 : sumY; for (int i = 0; i < poinsCount; i++) { percentValues[i] = 100 * yValues[i] / sumY; } Chart1.Series["Series1"].Points.DataBindXY(xValues, yValues); for (int i = 0; i < poinsCount; i++) { Chart1.Series["Series1"].Points[i].ToolTip = string.Format("{0}消费金额{1}元,占{2}%", xValues[i], yValues[i], percentValues[i]); } // Set "bubble" series shape Chart1.Series["Series1"].MarkerStyle = (MarkerStyle)MarkerStyle.Parse(typeof(MarkerStyle), Shape.SelectedItem.Value); // Set max bubble size Chart1.Series["Series1"]["BubbleMaxSize"] = MaxSize.SelectedItem.Text; // Show as 2D or 3D if (Show3D.Checked) { Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true; } else { Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false; } }
/// <summary> /// Initializes a new instance of the FancyControls.Data.Marker class. /// </summary> /// <param name="color"> /// Sets marker color. /// </param> /// <param name="size"> /// Sets marker size. /// </param> /// <param name="style"> /// Sets marker style. /// </param> /// <param name="borderColor"> /// Sets marker border color. /// </param> /// <param name="borderWidth"> /// Sets marker bordor width. /// </param> /// <param name="image"> /// Sets marker image. /// </param> /// <param name="imageTranparentColor"> /// Sets marker image transparent color. /// </param> public Marker(MarkerStyle style, Color color, int size, Color borderColor, int borderWidth, string image, Color imageTranparentColor) { this.Color = color; this.Size = size; this.Style = style; this.BorderColor = borderColor; this.Image = image; this.ImageTransparentColor = imageTranparentColor; }
/// <summary> /// MarkerStyle /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cboMarkerStyle_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cbo = sender as ComboBox; MarkerStyle data = (MarkerStyle)Enum.Parse(typeof(MarkerStyle), cbo.Text, true); // Set marker shape chart1.Series["Series1"].MarkerStyle = data; }
// Token: 0x060033DD RID: 13277 RVA: 0x000E6FBC File Offset: 0x000E51BC internal void AddEntry(MarkerStyle m, long nILS, long nStartIndexOverride, long nStartIndexDefault, long nLevel) { this.Add(new MarkerListEntry { Marker = m, StartIndexOverride = nStartIndexOverride, StartIndexDefault = nStartIndexDefault, VirtualListLevel = nLevel, ILS = nILS }); }
internal static ILStyledMarkerShape Create(ILPanel panel, MarkerStyle style) { switch (panel.GraphicDeviceType) { case GraphicDeviceType.OpenGL: return(new ILOGLStyledMarkerShape(panel, style)); default: throw new NotImplementedException("styled markers are not implemented yet for this graphics device type!"); } }
public void SetSourcesAndElements(Bitmap olmarker, Bitmap up, Bitmap upleft, Bitmap upright, Color green, Color red, Color white) { // Define layer and datasource for route line and instructions routeDataSource = new LocalVectorDataSource(BaseProjection); VectorLayer routeLayer = new VectorLayer(routeDataSource); MapView.Layers.Add(routeLayer); // Define layer and datasource for route start and stop markers routeStartStopDataSource = new LocalVectorDataSource(BaseProjection); // Initialize a vector layer with the previous data source VectorLayer vectorLayer = new VectorLayer(routeStartStopDataSource); // Add the previous vector layer to the map MapView.Layers.Add(vectorLayer); // Set visible zoom range for the vector layer vectorLayer.VisibleZoomRange = new MapRange(0, 22); // Create markers for start & end and a layer for them MarkerStyleBuilder markerBuilder = new MarkerStyleBuilder(); markerBuilder.Bitmap = olmarker; markerBuilder.HideIfOverlapped = false; markerBuilder.Size = 30; markerBuilder.Color = green; startMarker = new Marker(new MapPos(0, 0), markerBuilder.BuildStyle()); startMarker.Visible = false; markerBuilder.Color = red; stopMarker = new Marker(new MapPos(0, 0), markerBuilder.BuildStyle()); stopMarker.Visible = false; routeStartStopDataSource.Add(startMarker); routeStartStopDataSource.Add(stopMarker); markerBuilder.Color = white; markerBuilder.Bitmap = up; instructionUp = markerBuilder.BuildStyle(); markerBuilder.Bitmap = upleft; instructionLeft = markerBuilder.BuildStyle(); markerBuilder.Bitmap = upright; instructionRight = markerBuilder.BuildStyle(); // Style for instruction balloons balloonBuilder = new BalloonPopupStyleBuilder(); balloonBuilder.TitleMargins = new BalloonPopupMargins(4, 4, 4, 4); }
public PlayerPreview(Player player, MarkerStyle markerStyle) { if (player == null) { throw new ArgumentNullException(nameof(player)); } ChampionName = player.SKIN; PlayerName = player.NAME; PlayerMarkerStyle = markerStyle; marker = null; imgSrc = null; }
public static Series PlacePoint(Point point, Color color, int size = 8, MarkerStyle marker = MarkerStyle.Circle) { Series s = new Series($"Point{point.Y}-{point.X1}-{point.X2}"); s.Points.AddXY(point.X1, point.X2); s.ChartType = SeriesChartType.Point; s.MarkerColor = color; s.MarkerSize = size; s.MarkerBorderWidth = 2; s.MarkerStyle = marker; s.Label = point.Y.ToString(); return(s); }
public Form1() { InitializeComponent(); this.trawersyForm = new Form2(this); airMarkerSize = 5; airMarkerStyle = MarkerStyle.Circle; ch4MarkerSize = 5; ch4MarkerStyle = MarkerStyle.Circle; disableDataUsableOptions(); #if !DEBUG lb("Oprogramowanie IMG PAN do analizy danych z przyrządów. Do użytku wewnętrzengo. Wersja " + AssemblyVersion.Major.ToString() + "." + AssemblyVersion.Minor.ToString() + "." + AssemblyVersion.Build.ToString() + "." + AssemblyVersion.Revision.ToString()); #endif }
protected void Page_Load(object sender, System.EventArgs e) { // Set bubble series shape to image if (Shape.SelectedItem.Value == "Image") { Chart1.Series["Series1"].MarkerImage = "Face.bmp"; Chart1.Series["Series1"].MarkerImageTransparentColor = Color.White; } // Set "bubble" series shape else { Chart1.Series["Series1"].MarkerStyle = (MarkerStyle)MarkerStyle.Parse(typeof(MarkerStyle), Shape.SelectedItem.Value); } // Set max bubble size Chart1.Series["Series1"]["BubbleMaxSize"] = MaxSize.SelectedItem.Text; Chart1.Series["Series2"]["BubbleMaxSize"] = MaxSize.SelectedItem.Text; // Show Y value or bubble sise as point labels Chart1.Series["Series1"].IsValueShownAsLabel = true; Chart1.Series["Series2"].IsValueShownAsLabel = true; if (BubbleSizeSizeForLabel.Checked) { Chart1.Series["Series1"]["BubbleUseSizeForLabel"] = "true"; Chart1.Series["Series2"]["BubbleUseSizeForLabel"] = "true"; } // Set scale for the bubble size if (ScaleMin.SelectedItem.Text != "Auto") { Chart1.Series["Series1"]["BubbleScaleMin"] = ScaleMin.SelectedItem.Text; Chart1.Series["Series2"]["BubbleScaleMin"] = ScaleMin.SelectedItem.Text; } if (ScaleMax.SelectedItem.Text != "Auto") { Chart1.Series["Series1"]["BubbleScaleMax"] = ScaleMax.SelectedItem.Text; Chart1.Series["Series2"]["BubbleScaleMax"] = ScaleMax.SelectedItem.Text; } // Show as 2D or 3D if (Show3D.Checked) { Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true; } else { Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false; } }
public void SetSourcesAndElements(Bitmap olmarker, Bitmap up, Bitmap upleft, Bitmap upright, Color green, Color red, Color white) { // Define layer and datasource for route line routeDataSource = new LocalVectorDataSource(Projection); routeLayer = new VectorLayer(routeDataSource); MapView.Layers.Add(routeLayer); // Define layer and datasource for route instructions routeInstructionSource = new LocalVectorDataSource(Projection); routeInstructionLayer = new VectorLayer(routeInstructionSource); MapView.Layers.Add(routeInstructionLayer); // Define layer and datasource for route start and stop markers routeStartStopDataSource = new LocalVectorDataSource(Projection); // Initialize a vector layer with the previous data source startStopLayer = new VectorLayer(routeStartStopDataSource); // Add the previous vector layer to the map MapView.Layers.Add(startStopLayer); // Create markers for start & end and a layer for them MarkerStyleBuilder markerBuilder = new MarkerStyleBuilder(); markerBuilder.Bitmap = olmarker; markerBuilder.HideIfOverlapped = false; markerBuilder.Size = 30; markerBuilder.Color = green; startMarker = new Marker(new MapPos(0, 0), markerBuilder.BuildStyle()); startMarker.Visible = false; markerBuilder.Color = red; stopMarker = new Marker(new MapPos(0, 0), markerBuilder.BuildStyle()); stopMarker.Visible = false; routeStartStopDataSource.Add(startMarker); routeStartStopDataSource.Add(stopMarker); markerBuilder.Color = white; markerBuilder.Bitmap = up; markerBuilder.Size = 20; instructionUp = markerBuilder.BuildStyle(); markerBuilder.Bitmap = upleft; instructionLeft = markerBuilder.BuildStyle(); markerBuilder.Bitmap = upright; instructionRight = markerBuilder.BuildStyle(); }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); // Add default base layer AddOnlineBaseLayer(CartoBaseMapStyle.CartoBasemapStylePositron); // Initialize a local vector data source LocalVectorDataSource source = new LocalVectorDataSource(BaseProjection); // Initialize a vector layer with the previous data source var layer = new ClusteredVectorLayer(source, new MyClusterElementBuilder()); // Default is 100. A good value depends on data layer.MinimumClusterDistance = 50; // read json from assets and add to map string json = System.IO.File.ReadAllText(AssetUtils.CalculateResourcePath("cities15000.geojson")); // Create a basic style, as the ClusterElementBuilder will set the real style var markerStyleBuilder = new MarkerStyleBuilder(); markerStyleBuilder.Size = 14; MarkerStyle style = markerStyleBuilder.BuildStyle(); // Read GeoJSON, parse it using SDK GeoJSON parser GeoJSONGeometryReader reader = new GeoJSONGeometryReader(); // Set target projection to base (mercator) reader.TargetProjection = BaseProjection; // Read features from local asset FeatureCollection features = reader.ReadFeatureCollection(json); VectorElementVector elements = new VectorElementVector(); for (int i = 0; i < features.FeatureCount; i++) { // This data set features point geometry, // however, it can also be LineGeometry or PolygonGeometry PointGeometry geometry = (PointGeometry)features.GetFeature(i).Geometry; elements.Add(new Marker(geometry, style)); } // Add the clustered vector layer to the map source.AddAll(elements); MapView.Layers.Add(layer); }
/// <summary> /// convert marker style into bitmap /// </summary> /// <param name="marker">marker with style property</param> /// <returns>bitmap according to style</returns> /// <remarks>the bitmap will be loaded from ILNumerics.Drawing ressources. For marker style 'bitmap' /// the bitmap referenced in the marker will be returned.</remarks> public static Bitmap BitmapFromStyle(MarkerStyle style) { switch (style) { case MarkerStyle.Circle: return Resources.Markers.Circle25x25; case MarkerStyle.Diamond: return Resources.Markers.Diamond25x25; case MarkerStyle.TriangleUp: return Resources.Markers.TriangleUp25x25; case MarkerStyle.TriangleDown: return Resources.Markers.TriangleDown25x25; case MarkerStyle.TriangleLeft: return Resources.Markers.TriangleLeft25x25; case MarkerStyle.TriangleRight: return Resources.Markers.TriangleRight25x25; case MarkerStyle.Plus: return Resources.Markers.Plus25x25; case MarkerStyle.Cross: return Resources.Markers.Cross25x25; default: throw new NotImplementedException("ILStyledMarker: marker style not supported!"); } return null; }
internal static string MarkerStyleToOldRTFString(MarkerStyle ms) { switch (ms) { case MarkerStyle.MarkerBullet: // return "\\pnbidia"; // return "\\pnbidib"; return "\\pnlvlblt"; default: case MarkerStyle.MarkerArabic: // return "\\pndec"; return "\\pnlvlbody\\pndec"; case MarkerStyle.MarkerCardinal: return "\\pnlvlbody\\pncard"; case MarkerStyle.MarkerUpperAlpha: return "\\pnlvlbody\\pnucltr"; case MarkerStyle.MarkerUpperRoman: return "\\pnlvlbody\\pnucrm"; case MarkerStyle.MarkerLowerAlpha: return "\\pnlvlbody\\pnlcltr"; case MarkerStyle.MarkerLowerRoman: return "\\pnlvlbody\\pnlcrm"; case MarkerStyle.MarkerOrdinal: //return "\\pnlvlbody\\pnordt"; return "\\pnlvlbody\\pnord"; } }
internal void AddEntry(MarkerStyle m, long nILS, long nStartIndexOverride, long nStartIndexDefault, long nLevel) { MarkerListEntry entry = new MarkerListEntry(); entry.Marker = m; entry.StartIndexOverride = nStartIndexOverride; entry.StartIndexDefault = nStartIndexDefault; entry.VirtualListLevel = nLevel; entry.ILS = nILS; Add(entry); }
internal static string MarkerStyleToString(MarkerStyle ms) { switch (ms) { case MarkerStyle.MarkerArabic: return "Decimal"; case MarkerStyle.MarkerUpperRoman: return "UpperRoman"; case MarkerStyle.MarkerLowerRoman: return "LowerRoman"; case MarkerStyle.MarkerUpperAlpha: return "UpperLatin"; case MarkerStyle.MarkerLowerAlpha: return "LowerLatin"; case MarkerStyle.MarkerOrdinal: return "Decimal"; // Note no XAML support case MarkerStyle.MarkerCardinal: return "Decimal"; // Note no XAML support case MarkerStyle.MarkerHidden: return "None"; case MarkerStyle.MarkerBullet: return "Disc"; default: return "Decimal"; } }
private Series addSeries(IEnumerable<DateTime> dates, IEnumerable<decimal>[] valueLists, string seriesName, SeriesChartType chartType, Color color, MarkerStyle markerStyle) { Series series = new Series(seriesName); chPortfolioFutureValue.Series.Add(series); series.LegendText = seriesName; series.XValueType = ChartValueTypes.DateTime; series.EmptyPointStyle.Color = Color.Transparent; series.BorderWidth = 2; series.Color = color; series.MarkerStyle = markerStyle; if (dates.Count() == 1 && chartType != SeriesChartType.SplineRange) { series.Type = SeriesChartType.Point; series.MarkerSize = 8; } else series.Type = chartType; series.Points.DataBindXY(dates, valueLists); return series; }
private Series addSeries(IEnumerable<DateTime> dates, IEnumerable<decimal> valueList, string seriesName, SeriesChartType chartType, Color color, MarkerStyle markerStyle) { return addSeries(dates, new IEnumerable<decimal>[] { valueList }, seriesName, chartType, color, markerStyle); }
/// <summary> /// コンストラクタ /// </summary> public Plot() { this.IsSeriesPlot = false; this.SeriesIndex = -1; this.Splitter = " ?, ?"; this.a = 1; this.b = 0; this.ChartType = SeriesChartType.FastLine; this.MarkerSize = 5; this.MarkerStyle = MarkerStyle.Square; this.YAxisType = AxisType.Primary; }
private static string MarkerAlphaCountToString(StringBuilder sb, MarkerStyle ms, long nCount) { int toThe1 = 26; int toThe2 = 676; int toThe3 = 17576; int toThe4 = 456976; char[] ca = new char[1]; int temp; temp = 0; while (nCount > toThe4 + toThe3 + toThe2 + toThe1) { temp++; nCount -= toThe4; } if (temp > 0) { if (temp > 26) temp = 26; ca[0] = (char)('A' + (temp - 1)); sb.Append(ca); } temp = 0; while (nCount > toThe3 + toThe2 + toThe1) { temp++; nCount -= toThe3; } if (temp > 0) { ca[0] = (char)('A' + (temp - 1)); sb.Append(ca); } temp = 0; while (nCount > toThe2 + toThe1) { temp++; nCount -= toThe2; } if (temp > 0) { ca[0] = (char)('A' + (temp - 1)); sb.Append(ca); } temp = 0; while (nCount > toThe1) { temp++; nCount -= toThe1; } if (temp > 0) { ca[0] = (char)('A' + (temp - 1)); sb.Append(ca); } ca[0] = (char)('A' + (nCount - 1)); sb.Append(ca); if (ms == MarkerStyle.MarkerUpperAlpha) { return sb.ToString(); } else { return sb.ToString().ToLower(CultureInfo.InvariantCulture); } }
/// <summary> /// 生成共用方法 /// </summary> /// <param name="bools"></param> /// <param name="chartp"></param> /// <param name="col"></param> /// <param name="msa"></param> private void ChartHandle(bool bools, ChartColorPalette chartp, SeriesChartType col, MarkerStyle msa, bool legend) { FillDeptIdList(BindDT); if (BindDT.Rows.Count > 0) { Chart1.Series["Series1"].Points.DataBindXY(BindDT.DefaultView, BindX, BindDT.DefaultView, BindY); this.Chart1.ChartAreas["Default"].AxisY.Title =TitleY; Chart1.Series["Series1"].Palette = chartp; if (BindIndex != null) { Chart1.Series["Series1"].Href = "javascript:LinkDetail('#INDEX')"; } else { ImageButton1.Visible = false; } this.Chart1.ChartAreas["Default"].AxisX.Title =TitleX; if (legend) { Chart1.Series["Series1"].LegendText =LegendText; } else { Chart1.Series["Series1"].LegendText = ""; } Chart1.ChartAreas["Default"].Area3DStyle.Enable3D = bools; foreach (Series series in Chart1.Series) { series.Type = col; series.MarkerStyle = msa; series.MarkerSize = 15; series.ToolTip = "点击查看明细"; series.ShowLabelAsValue = true; } Chart1.Visible = true; nodata.Visible = false; } else { Chart1.Visible = false; nodata.Visible = true; } }
/// <summary> /// create new styled marker /// </summary> internal ILStyledMarkerShape (ILPanel panel, MarkerStyle style) : base(panel) { m_style = style; }
private Series createSeries(string seriesName, Color color, SeriesChartType chartType, MarkerStyle markerStyle, IEnumerable<DateTime> dates, params IEnumerable<decimal>[] valueLists) { Series series = new Series(seriesName); series.LegendText = seriesName; series.XValueType = ChartValueTypes.DateTime; series.EmptyPointStyle.Color = Color.Transparent; series.BorderWidth = 2; series.Color = color; series.MarkerStyle = markerStyle; if (dates.Count() == 1 && chartType != SeriesChartType.SplineRange) { series.Type = SeriesChartType.Point; series.MarkerSize = 8; } else series.Type = chartType; series.YValuesPerPoint = valueLists.Length; series.Points.DataBindXY(dates, valueLists); return series; }
public void DrawMarker(int x, int y, CvScalar color, MarkerStyle style, int size, LineType lineType, int thickness) { int r = size / 2; switch (style) { case MarkerStyle.CircleLine: Circle(x, y, r, color, thickness, lineType); break; case MarkerStyle.CircleFilled: Circle(x, y, r, color, -1, lineType); break; case MarkerStyle.Cross: Line(x, y - r, x, y + r, color, thickness, lineType); Line(x - r, y, x + r, y, color, thickness, lineType); break; case MarkerStyle.TiltedCross: Line(x - r, y - r, x + r, y + r, color, thickness, lineType); Line(x + r, y - r, x - r, y + r, color, thickness, lineType); break; case MarkerStyle.CircleAndCross: Circle(x, y, r, color, thickness, lineType); Line(x, y - r, x, y + r, color, thickness, lineType); Line(x - r, y, x + r, y, color, thickness, lineType); break; case MarkerStyle.CircleAndTiltedCross: Circle(x, y, r, color, thickness, lineType); Line(x - r, y - r, x + r, y + r, color, thickness, lineType); Line(x + r, y - r, x - r, y + r, color, thickness, lineType); break; case MarkerStyle.DiamondLine: case MarkerStyle.DiamondFilled: { int r2 = (int)(size * Math.Sqrt(2) / 2.0); CvPoint[] pts = new CvPoint[] { new CvPoint(x, y-r2), new CvPoint(x+r2, y), new CvPoint(x, y+r2), new CvPoint(x-r2, y), }; switch (style) { case MarkerStyle.DiamondLine: PolyLine(new CvPoint[][] { pts }, true, color, thickness, lineType); break; case MarkerStyle.DiamondFilled: FillConvexPoly(pts, color, lineType); break; } } break; case MarkerStyle.SquareLine: case MarkerStyle.SquareFilled: { CvPoint[] pts = new CvPoint[] { new CvPoint(x-r, y-r), new CvPoint(x+r, y-r), new CvPoint(x+r, y+r), new CvPoint(x-r, y+r), }; switch (style) { case MarkerStyle.SquareLine: PolyLine(new CvPoint[][] { pts }, true, color, thickness, lineType); break; case MarkerStyle.SquareFilled: FillConvexPoly(pts, color, lineType); break; } } break; default: throw new NotImplementedException(); } }
public void DrawMarker(int x, int y, CvScalar color, MarkerStyle style, int size, LineType lineType) { DrawMarker(x, y, color, style, size, LineType.Link8, 1); }
internal static string MarkerCountToString(MarkerStyle ms, long nCount) { StringBuilder sb = new StringBuilder(); if (nCount < 0) { nCount = 0; } switch (ms) { case MarkerStyle.MarkerUpperRoman: case MarkerStyle.MarkerLowerRoman: { return MarkerRomanCountToString(sb, ms, nCount); } case MarkerStyle.MarkerLowerAlpha: case MarkerStyle.MarkerUpperAlpha: { return MarkerAlphaCountToString(sb, ms, nCount); } case MarkerStyle.MarkerArabic: case MarkerStyle.MarkerOrdinal: case MarkerStyle.MarkerCardinal: return nCount.ToString(CultureInfo.InvariantCulture); case MarkerStyle.MarkerHidden: case MarkerStyle.MarkerNone: return ""; case MarkerStyle.MarkerBullet: default: return "\\'B7"; } }
internal ILOGLStyledMarkerShape (ILPanel panel, MarkerStyle style) : base (panel,style) { }
private static string MarkerRomanCountToString(StringBuilder sb, MarkerStyle ms, long nCount) { while (nCount >= 1000) { sb.Append("M"); nCount -= 1000; } // 100's switch (nCount / 100) { case 9: sb.Append("CM"); break; case 8: sb.Append("DCCC"); break; case 7: sb.Append("DCC"); break; case 6: sb.Append("DC"); break; case 5: sb.Append("D"); break; case 4: sb.Append("CD"); break; case 3: sb.Append("CCC"); break; case 2: sb.Append("CC"); break; case 1: sb.Append("C"); break; case 0: break; } nCount = nCount % 100; // 10's switch (nCount / 10) { case 9: sb.Append("XC"); break; case 8: sb.Append("LXXX"); break; case 7: sb.Append("LXX"); break; case 6: sb.Append("LX"); break; case 5: sb.Append("L"); break; case 4: sb.Append("XL"); break; case 3: sb.Append("XXX"); break; case 2: sb.Append("XX"); break; case 1: sb.Append("X"); break; case 0: break; } nCount = nCount % 10; // 1's switch (nCount) { case 9: sb.Append("IX"); break; case 8: sb.Append("VIII"); break; case 7: sb.Append("VII"); break; case 6: sb.Append("VI"); break; case 5: sb.Append("V"); break; case 4: sb.Append("IV"); break; case 3: sb.Append("III"); break; case 2: sb.Append("II"); break; case 1: sb.Append("I"); break; case 0: break; } if (ms == MarkerStyle.MarkerUpperRoman) { return sb.ToString(); } else { return sb.ToString().ToLower(CultureInfo.InvariantCulture); } }
public Marker(Marker prototype): base(prototype) { mMarkerStyle = prototype.Style; DrawPath(); }
internal static bool ConvertToMarkerStyle(ConverterState converterState, string styleName, ref MarkerStyle ms) { ms = MarkerStyle.MarkerBullet; if (styleName.Length == 0) { return false; } ms = (MarkerStyle)BasicLookup(MarkerStyleTable, styleName); return true; }
public GuitarProperties( AxeCalc app, CustomClass calculatedStuff ) { // initialize the prefabs m_saddlePrefabs = new Dictionary<SaddleStyles, netDxf.DxfDocument>(); foreach( SaddleStyles style in Enum.GetValues( typeof( SaddleStyles ) ) ) { string strName = Enum.GetName( typeof( SaddleStyles ), style ); try { netDxf.DxfDocument dxf = new netDxf.DxfDocument(); dxf.Load( "Data/Saddles/" + strName + ".dxf" ); m_saddlePrefabs.Add( style, dxf ); } catch { } } m_calculatedStuff = calculatedStuff; m_iStringCount = 6; m_iFretCount = 22; m_iStraightFret = 8; ScaleLength = "630"; TotalBridgeStringSpacing = 51.85; // 52.5; TotalNutStringSpacing = 35.05; // 35.7; FretboardWidthAtNut = 43; FretboardWidthAt12th = 53; m_dFretwireWidth = 2.79; m_dFretwireCrownHeight = 1.32; m_bZeroFret = true; m_dZeroFretNutOffset = 8; m_dNutWidth = 5; m_dStringHeightAt12th = 3; m_dMinStringHeightAt12th = 1.5; m_dMaxStringHeightAt12th = 4; m_dDotRadius = 3; m_dDotEdgeSpacing = 6; m_eMarkerStyle = MarkerStyle.Centred; m_dSquareBlockSpacing = 3; m_dSquareBlockWidth = 30; SaddleStyle = SaddleStyles.Hardtail; m_bridgePickup.Type = PickupTypes.Humbucker; m_bridgePickup.m_dPosition = 43 / 630.0; m_neckPickup.Type = PickupTypes.Humbucker; m_neckPickup.m_dPosition = 148 / 630.0; /* fStratNeckPos = 6.375 / 25.5 fStratMiddlePos = 3.875 / 25.5 fStratBridgePos = 1.625 / 25.5 fStratBridgeBassPos = 1.815 / 25.5 fStratBridgeTreblePos = 1.435 / 25.5 fJBNeckPos = 6 / 34.0 fJBBridgePos = 2.13 / 34.0 fPRSNeckPos = 148 / 635.0 fPRSBridgePos = 43 / 635.0 */ // These are based on what D'Addario's Regular Light strings give on a 25.5" scale guitar m_dPlainSteelStringTensionTarget = 16; m_dNickelWoundStringTensionTarget = 18.5; m_tuning = new Tuning( this, m_calculatedStuff ); Type t = typeof( GuitarProperties ); //Add( new CustomProperty( this, m_iTestValue ) ); AddMarkedUpVariables( this ); Refresh( app ); }
public Marker(MarkerStyle style) { mMarkerStyle = style; DrawPath(); }
public ILMarkerShapeProxy (MarkerStyle style) : base (null) { m_source = style; }
//Constructor public Marker() { mMarkerStyle = MarkerStyle.Ellipse; DrawPath(); }
internal static ILStyledMarkerShape Create(ILPanel panel, MarkerStyle style) { switch (panel.GraphicDeviceType) { case GraphicDeviceType.OpenGL: return new ILOGLStyledMarkerShape(panel,style); default: throw new NotImplementedException("styled markers are not implemented yet for this graphics device type!"); } }