/// <summary> /// 取得指定索引的色彩筆刷 /// </summary> /// <param name="colorID">色彩索引</param> /// <returns>取得筆刷</returns> public SolidBrush GetBrush(string colorID) { DrawColor drawColor; if (_DrawColor.TryGetValue(colorID, out drawColor)) { if (drawColor.Brush == null) { Color brushColor = ColorFix.GetColor(drawColor.Color, Opacity, RFix, GFix, BFix); drawColor.Brush = DrawPool.GetBrush(brushColor); } return(drawColor.Brush); } return(_BrushNull); }
/// <summary> /// 取得指定索引的色彩畫筆 /// </summary> /// <param name="colorID">色彩索引</param> /// <returns>取得畫筆</returns> public Pen GetPen(string colorID) { DrawColor drawColor; if (_DrawColor.TryGetValue(colorID, out drawColor)) { if (drawColor.Pen == null) { Color penColor = ColorFix.GetColor(drawColor.Color, Opacity, RFix, GFix, BFix); drawColor.Pen = DrawPool.GetPen(penColor); } return(drawColor.Pen); } return(_PenNull); }