{
get \r
{
- return _dashPattern;
+ return (float [])_dashPattern.Clone();
}
set \r
\r
switch (DashStyle) {\r
case DashStyle.Custom:\r
- if (DashPattern != null) {\r
- dashPattern = new float[DashPattern.Length];\r
- for(int i = 0; i < DashPattern.Length; i++) {
+ if (_dashPattern != null) {\r
+ dashPattern = new float[_dashPattern.Length];\r
+ for(int i = 0; i < _dashPattern.Length; i++) {
if (EndCap == LineCap.Flat)
- dashPattern[i] = DashPattern[i] * Width;
+ dashPattern[i] = _dashPattern[i] * Width;
else {
- if ((i & 1) == 0)
+ if ((i & 1) == 0) {
// remove the size of caps from the opaque parts
- dashPattern[i] = (DashPattern[i] * Width) - Width;
+ dashPattern[i] = (_dashPattern[i] * Width) - Width;
+ if (_dashPattern[i] < 0)
+ dashPattern[i] = 0;
+ }
else
// add the size of caps to the transparent parts
- dashPattern[i] = (DashPattern[i] * Width) + Width;
+ dashPattern[i] = (_dashPattern[i] * Width) + Width;
}
}\r
}\r