public Style() { ColorRange = new ColorRange(); ColorMode = ColorMode.Rgb; EllipseMode = EllipseMode.Center; RectangleMode = RectangleMode.Corner; ImageMode = ImageMode.Corner; FillParameters = new FillParameters(new Color(255, 255, 255, 255)); StrokeParameters = new StrokeParameters(new Color(0, 0, 0, 255)); TintParameters = new TintParameters(new Color()) { Disabled = true }; Font = new Font("Arial", 10f); }
public void SetColorMode(ColorModeParameters parms) { ColorMode = parms.Mode; switch (parms.Mode) { //case ColorMode.Hsb: // ColorRange.SetDefaults(360f, 1f, 1f, 255f); // break; default: ColorRange.SetDefaults(255f, 255f, 255f, 255f); break; } ColorRange.Max1 = parms.Max1 ?? ColorRange.Max1; ColorRange.Max2 = parms.Max2 ?? ColorRange.Max2; ColorRange.Max3 = parms.Max3 ?? ColorRange.Max3; ColorRange.MaxAlpha = parms.MaxAlpha ?? ColorRange.MaxAlpha; }