C# Class PurplePen.CourseFormatter

Show file Open project: petergolde/PurplePen

Public Methods

Method Description
ComputeAngleOut ( EventDB eventDB, CourseView courseView, int controlIndex ) : double
CreateSimpleLeg ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, Id courseControlId1, Id courseControlId2 ) : CourseObj
ExpandText ( EventDB eventDB, CourseView courseView, string text ) : string
FormatCourseToLayout ( SymbolDB symbolDB, CourseView courseView, CourseAppearance appearance, CourseLayout courseLayout, CourseLayer layer ) : void
GetCourseDescription ( EventDB eventDB, SymbolDB symbolDB, CourseDesignator courseDesignator, DescriptionKind &descKind ) : PurplePen.DescriptionLine[]
GetLegPath ( EventDB eventDB, PointF pt1, ControlPointKind kind1, Id controlId1, PointF pt2, ControlPointKind kind2, Id controlId2, float scaleRatio, CourseAppearance appearance, LegGap &gaps ) : SymPath

Private Methods

Method Description
AutoCutCircles ( CourseLayout courseLayout, CourseLayer layer ) : void
AutoCutControl ( PointCourseObj controlObj, CourseLayout courseLayout ) : void
AutoCutLeg ( EventDB eventDB, CourseAppearance appearance, CourseDesignator courseDesignator, LineCourseObj legObj, CourseLayout courseLayout ) : void
AutoCutLegs ( EventDB eventDB, CourseAppearance appearance, CourseDesignator courseDesignator, CourseLayout courseLayout, CourseLayer layer ) : void
CreateCode ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, CourseView controlView, IEnumerable existingObjects ) : CourseObj
CreateControlNumber ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, ControlLabelKind labelKind, CourseView controlView, CourseView courseView, IEnumerable existingObjects ) : CourseObj
CreateCourseObject ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, float printScale, CourseView controlView, double angleOut ) : CourseObj
CreateCourseObject ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, float printScale, Id controlId, Id courseControlId, double angleOut ) : CourseObj
CreateDescriptionSpecial ( EventDB eventDB, SymbolDB symbolDB, CourseView descriptionView, CourseLayer layer ) : CourseObj
CreateLeg ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, Id courseControlId1, CourseView controlView1, CourseView controlView2, Id legId ) : PurplePen.CourseObj[]
CreateSpecial ( EventDB eventDB, CourseView courseView, float scaleRatio, CourseAppearance appearance, Id specialId, CourseLayer normalLayer ) : CourseObj
CustomPlaceNumber ( EventDB eventDB, CourseView controlView ) : bool
CutControlWithRespectTo ( PointCourseObj controlObj, PointCourseObj courseObj ) : void
CutLegAtPoint ( LineCourseObj legObj, PointF intersectionPoint, float gapRadius ) : void
CutLegWithRespectTo ( EventDB eventDB, CourseAppearance appearance, CourseDesignator courseDesignator, LineCourseObj legObj, LineCourseObj otherObj ) : void
CutLegWithRespectTo ( EventDB eventDB, CourseAppearance appearance, CourseDesignator courseDesignator, LineCourseObj legObj, PointCourseObj otherObj ) : void
FindControlViewsWithControlId ( CourseView courseView, Id controlId ) : List
FindLongestDescription ( EventDB eventDB, SymbolDB symbolDB ) : CourseDesignator
GetControlLabelText ( EventDB eventDB, ControlLabelKind labelKind, CourseView controlView, CourseView courseView ) : string
GetLegPath ( PointF pt1, double radius1, PointF pt2, double radius2, PointF bends, LegGap gaps ) : SymPath
GetLegRadius ( ControlPointKind controlKind, float scaleRatio, CourseAppearance appearance ) : double
GetMinDistanceFromNearby ( PointF pt, List list ) : double
GetNearbyObjects ( IEnumerable list, PointF pt, float distance ) : List
GetOtherLocations ( EventDB eventDB, CourseView courseView, CourseView controlViewExcept ) : System.Drawing.PointF[]
GetRectangleCenter ( PointF centerPt, float distanceFromCenter, double angle, SizeF rectSize ) : PointF
GetTextLocation ( PointF controlLocation, float distanceFromCenter, string text, FontDesc font, float fontScaling, IEnumerable list ) : PointF
GetTextSize ( string text, FontDesc font, float fontScaling ) : SizeF

Method Details

ComputeAngleOut() public static method

public static ComputeAngleOut ( EventDB eventDB, CourseView courseView, int controlIndex ) : double
eventDB EventDB
courseView CourseView
controlIndex int
return double

CreateSimpleLeg() public static method

public static CreateSimpleLeg ( EventDB eventDB, float scaleRatio, CourseAppearance appearance, Id courseControlId1, Id courseControlId2 ) : CourseObj
eventDB EventDB
scaleRatio float
appearance CourseAppearance
courseControlId1 Id
courseControlId2 Id
return CourseObj

ExpandText() public static method

public static ExpandText ( EventDB eventDB, CourseView courseView, string text ) : string
eventDB EventDB
courseView CourseView
text string
return string

FormatCourseToLayout() public static method

public static FormatCourseToLayout ( SymbolDB symbolDB, CourseView courseView, CourseAppearance appearance, CourseLayout courseLayout, CourseLayer layer ) : void
symbolDB SymbolDB
courseView CourseView
appearance CourseAppearance
courseLayout CourseLayout
layer CourseLayer
return void

GetCourseDescription() public static method

public static GetCourseDescription ( EventDB eventDB, SymbolDB symbolDB, CourseDesignator courseDesignator, DescriptionKind &descKind ) : PurplePen.DescriptionLine[]
eventDB EventDB
symbolDB SymbolDB
courseDesignator CourseDesignator
descKind DescriptionKind
return PurplePen.DescriptionLine[]

GetLegPath() public static method

public static GetLegPath ( EventDB eventDB, PointF pt1, ControlPointKind kind1, Id controlId1, PointF pt2, ControlPointKind kind2, Id controlId2, float scaleRatio, CourseAppearance appearance, LegGap &gaps ) : SymPath
eventDB EventDB
pt1 System.Drawing.PointF
kind1 ControlPointKind
controlId1 Id
pt2 System.Drawing.PointF
kind2 ControlPointKind
controlId2 Id
scaleRatio float
appearance CourseAppearance
gaps LegGap
return SymPath