This example demonstrates how to create custom line patterns. Here is a screenshot with the results of the code execution.
using AxMapWinGIS;
using MapWinGIS;
namespace Examples
{
public partial class MapExamples
{
{
var sf = this.CreateLines();
sf.set_ShapeCategory(0, 0);
ct = sf.Categories.Add("River");
sf.set_ShapeCategory(1, 1);
ct = sf.Categories.Add("Direction");
sf.set_ShapeCategory(2, 2);
}
{
int width = 500;
int step = 50;
for (int i = 0; i < 3; i++)
{
int index = shp.numPoints;
index = shp.numPoints;
}
return sf;
}
}
}
tkMapColor
A list of named constants for some of the well-known colors.
Definition: Enumerations.cs:951
tkDashStyle
The available style of lines. Can be used for drawing polylines and outlines of the polygons.
Definition: Enumerations.cs:442
ShpfileType
The type of the shapefile.
Definition: Enumerations.cs:169
tkDefaultPointSymbol
The set of available point symbols. They represent macros for modification of several properties of t...
Definition: Enumerations.cs:460
tkMapProjection
Commonly used map projections to be set in Form Designer (see AxMap.Projection property).
Definition: Enumerations.cs:1741
Map component for visualization of vector, raster or grid data.
Definition: AxMap.cs:56
Provides means for defining custom pattern from lines and point symbols for rendering polyline layers...
Definition: LinePattern.cs:46
LineSegment AddMarker(tkDefaultPointSymbol Marker)
Adds a segment represented by point symbol (marker).
Definition: LinePattern.cs:64
void AddLine(uint Color, float Width, tkDashStyle style)
Adds a line segment to the pattern.
Definition: LinePattern.cs:54
Holds information about a single line or marker in the line pattern represented by LinePattern class.
Definition: LineSegment.cs:39
uint Color
Gets or sets the color of the line or marker.
Definition: LineSegment.cs:45
float MarkerSize
Gets or sets the size of marker in pixels.
Definition: LineSegment.cs:214
float MarkerInterval
Gets or sets the interval between markers.
Definition: LineSegment.cs:142
A point object represents a point with x, y, Z, and M values. Shapes created by adding point objects ...
Definition: PointClass.cs:38
double y
Gets or sets the y value of the point.
Definition: PointClass.cs:122
double x
Gets or sets the x value of the point.
Definition: PointClass.cs:113
LinePattern LinePattern
Gets or sets line pattern for rendering polyline shapefile.
Definition: ShapeDrawingOptions.cs:586
bool UseLinePattern
Gets or set the value which indicates whether line pattern will be used to render polyline shapefile.
Definition: ShapeDrawingOptions.cs:790
A shape object represents a geometric shape which can be added to a shapefile which is displayed in t...
Definition: Shape.cs:41
bool Create(ShpfileType shpType)
Creates a new shape of the specified type.
Definition: Shape.cs:154
bool InsertPoint(Point newPoint, ref int pointIndex)
Inserts the specified point object into the shape using the desired point index if possible.
Definition: Shape.cs:372
Represents a set of visualization options for shapefile layer.
Definition: ShapefileCategory.cs:47
ShapeDrawingOptions DrawingOptions
Gets or sets visualization options associated with the category.
Definition: ShapefileCategory.cs:52
Provides a functionality for accessing and editing ESRI shapefiles.
Definition: Shapefile.cs:72
int NumShapes
Gets the number of shapes in the shapefile.
Definition: Shapefile.cs:254
A utils object provides access to a set of utility functions to perform a variety of tasks on other o...
Definition: Utils.cs:20
tkMapProjection Projection
Sets projection of the map. It providers 2 most commonly used coordinate system/projections to be eas...
Definition: AxMap.cs:2709
int AddLayer(object Object, bool visible)
Adds a layer to the map.
Definition: AxMap.cs:1342
bool EditInsertShape(Shape shape, ref int shapeIndex)
Inserts a new shape in the shapefile.
Definition: Shapefile.cs:819
bool CreateNew(string shapefileName, ShpfileType shapefileType)
Initializes in-memory shapefile of the specified type.
Definition: Shapefile.cs:1401