internal void AddLine(decimal x, decimal y, decimal x2, decimal y2, decimal width, System.Drawing.Color c, LineStyleEnum ls) { // Get the line color double red = c.R; double green = c.G; double blue = c.B; red = Math.Round((red / 255), 3); green = Math.Round((green / 255), 3); blue = Math.Round((blue / 255), 3); // Get the line style Dotted - Dashed - Solid // TBD - Other line styles are possible through tiling patters. They just // need to be defined. string linestyle; switch (ls) { case LineStyleEnum.Dashed: linestyle = "[3 2] 0 d"; break; case LineStyleEnum.Dotted: linestyle = "[2] 0 d"; break; case LineStyleEnum.Solid: default: linestyle = "[] 0 d"; break; } _contents.AppendFormat(NumberFormatInfo.InvariantInfo, "q {0} w {1} {2} {3} RG {4} {5} {6} m {7} {8} l S Q\n", width, // line width red, green, blue, // line color linestyle, // line style x, y, x2, y2); // positioning }
public void Build(IIocContainer ctx) { Style = new LineStyleEnum(); }