Search code examples
javauser-interfacecanvasswtdraw2d

Cylinder Figures on Canvas SWT Draw2D


I understand that Draw2D doesn't provide support for more complex figures like cylinders and that we have to "construct them ourselves". I couldn't find much support for that route online. Is there any way I can construct a custom Figure representing a cylinder. I hope this isn't too broad but could someone please point me in the right direction?


Solution

  • As an alternative to constructing your own cylinder figure geometrically, you can use the GeoShapeCylinderFigure class from the org.eclipse.gmf.runtime.diagram.ui.geoshapes.internal.draw2d.figures package.