public virtual void InitShape(string content, GoShape shape, Color bColor, Color pColor, float topMarginX, float topMarginY, float bottomMarginX, float bottomMarginY) { bool solidColor = false; if (solidColor) { shape.BrushColor = bColor; shape.PenColor = pColor; } else { shape.FillSimpleGradient(bColor, Lighter(bColor), MiddleTop); shape.PenColor = Darker(bColor); } this.TopLeftMargin = new SizeF(topMarginX, topMarginY); this.BottomRightMargin = new SizeF(bottomMarginX, bottomMarginY); this.Background = shape; this.Text = content; }
public virtual void InitShape(GoShape shape, Color bColor, Color pColor, float tmx, float tmy, float bmx, float bmy) { bool solidColor = false; if (solidColor) { shape.BrushColor = bColor; shape.PenColor = pColor; } else { shape.FillSimpleGradient(bColor, Lighter(bColor), GoObject.MiddleTop);//MiddleTop = 32 shape.PenColor = Darker(bColor); } GraphNode.TopLeftMargin = new SizeF(tmx, tmy); GraphNode.BottomRightMargin = new SizeF(bmx, bmy); GraphNode.Background = shape; GraphNode.Text = GraphNode.Kind; }