Generates a linear bar geometry with the specified parameters.
Namespace: MindFusion.Gauges
File: GeometryFactory.js
JavaScript Copy Code |
---|
function createLinearGeometry (centerX, centerY, startInnerOffset, startOuterOffset, endInnerOffset, endOuterOffset, length, isVertical, capStart, capEnd, strokeInner, strokeOuter) |
Number. The x-coordinate of the generated geometry.
Number. The y-coordinate of the generated geometry.
Number. The start inner offset of the generated geometry relative to the specified center.
Number. The start outer offset of the generated geometry relative to the specified center.
Number. The end inner offset of the generated geometry relative to the specified center.
Number. The end outer offset of the generated geometry relative to the specified center.
Number. The length of the generated geometry.
Boolean. A flag indicating whether the generated geometry is vertical.
Boolean. A flag indicating whether to draw a stroke at the start of the bar.
Boolean. A flag indicating whether to draw a stroke at the end of the bar.
Boolean. A flag indicating whether to draw a stroke at the inner side of the bar.
Boolean. A flag indicating whether to draw a stroke at the outer side of the bar.
A PathFigure representing a linear bar with the specified parameters.
The generated geometry is a trapezium.For example, a vertical linear geometry with centerX = 10, centerY = 10,startInnerOffset = 0, startOuterOffset = 5, endInnerOffset = 0, endOuerOffset = 10,length = 100; will be a trapezium with points (10, 110), (15, 110), (20, 10), (10, 10).A horizontal lienar geometry with the above parameters will be a trapeziumwith points (10, 10), (10, 15), (110, 20), (110, 10).