문제

According to dojo documentation, lines in dojox.gfx support a number of stroke styles:

“Solid” “ShortDash” “ShortDot” “ShortDashDot” “ShortDashDotDot” “Dot” “Dash” “LongDash” “DashDot” “LongDashDot” “LongDashDotDot” “none”

  1. Am I limited to these combinations?
  2. Is it possible to create custom styles by defining a line/dot pattern?
  3. Is it possible to define the scale of the pattern or the unit length?

Thanks!

도움이 되었습니까?

해결책

Dojo is a cross platform API and on IE8 and below it generates VML, elsewhere (e.g. IE9+) it generates SVG.

  1. Microsoft's VML is limited to these combinations and therefore, to work cross-platform so is dojo.
  2. You could work around this by generating custom SVG stroke styles directly but they wouldn't work on IE8 and below.
  3. Not with VML, it is possible with native SVG though.

e.g.

<line stroke-dasharray="5, 5"/>
<line stroke-dasharray="15, 15"/>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top