file [Solved] createDrawingRectangle

2 years 1 day ago - 2 years 1 day ago #4316 by kurales
Hi,

Can somebody help me to create a Rectangle in my Module? I initialize IDiagramGraphicFactory:
IDiagramGraphicFactory gf = diagramHandle.getCreationFactory();
and then try to create the rectangle:
gf.createDrawingRectangle(layer , "", 50, 50, 700, 200);
but I can't understand, how can I define layer for this function. I've tried to convert this way:
IDiagramLayer dl = graphic.getLayer();
IDiagramDrawingsLayer layer = (IDiagramDrawingsLayer) dl;
but it doesn't work.

Please Log in or Create an account to join the conversation.

2 years 1 day ago #4318 by kurales
I have found the solution:
IDiagramGraphicFactory gf = diagramHandle.getCreationFactory();
IDiagramDG ff = diagramHandle.getDiagramNode();
IDiagramDrawingsLayer layer = ff.getDrawingsLayer(IDiagramDrawingsLayer.BACKGROUND);
gf.createDrawingRectangle(layer, "", 50, 50, 700, 200);

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.031 seconds
^ Back to Top