java - Draw a down triangle shape -
I am trying to pull down the triangle in my GanttRenderer class in JFreeChart. I can get size from size utilities:
shape triangle = shape utilities .createDownTriangle (4.0f); How do I draw shapes and set dimension parameters to the right place?
Public Class Renderer Gant Renderer [Private Final Task Series Collection Model; Public Renderer (Task Series Collection Model) {this.model = Model; } @ Override Protected Zero Draw Task (Graphics 2DG2, RangeRendererState State, AIRTARHA DATAARIA, CLASS PLOT PLOT, CATEGORIES Axis Domain Axis, Value Axis Range Axis, Gantt Character Dataset, Int Line, Int Column) {/ * Some Other Codes Here are the / / shape triangle = shape 4.0f); // Rectangle2D triangle container = triangle Gatebound 2D (); // triangle container.scert (subtaskstart translation, rectifaxfast, rectbreadth, rectbreadth); G2.setPaint (new color (255,0,0)); G2.draw (triangle); / * Here are some other code * /}}
Comments
Post a Comment