Table of Contents

Class CadSnapMarker

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

AutoCAD's AutoSnap markers as data, so that the canvas, Drafting Settings and a test draw and read the same: each snap kind's shape in pixels about the snap point, Size across, drawn LineWidth wide in ColorOn(int). Endpoint is a square, Midpoint a triangle, Center a circle, Geometric Center a circle with a dot, Node a circle with a cross, Quadrant a diamond, Intersection a cross, Extension a small cross on a dotted line, Insertion two squares, Perpendicular a right angle, Tangent a circle with a line on top, Nearest an hourglass, Apparent Intersection a cross in a square, Extended Apparent Intersection the same with three dots below, Parallel two slanted lines and a point of object snap tracking a small cross, 4.5 across. A circle is a ring of 24 points.

public static class CadSnapMarker
Inheritance
CadSnapMarker
Inherited Members

Fields

LineWidth

The width of a marker's lines, in pixels: 1.5.

Size

The size of a marker across, in pixels: 9.

Methods

ColorOn(int)

Gets the colour of the markers on a background, as 0xRRGGBB: AutoCAD's yellow, 0xFFFF00, on a dark one, and a dark grey, 0x1A1A1A, on a light one, where yellow would not show; a background is light where its luminance passes half.

NameOf(CadSnapKind)

Gets the name of a snap kind as AutoCAD's tooltip writes it: "Endpoint", "Geometric Center", "Apparent Intersection".

Strokes(CadSnapKind)

Gets the strokes of a snap kind's marker; none for a kind with no marker (none, grid, ortho, polar).