Closed Phillipus closed 4 years ago
That's good new though.
Everything we do should work with or without ScaledGraphics
...at 100% scale. ScaledGraphics
is only used by GEF if scaling/zoom != 1.0:
protected void paintClientArea(Graphics graphics) {
if (getChildren().isEmpty())
return;
if (scale == 1.0) {
super.paintClientArea(graphics);
} else {
ScaledGraphics g = new ScaledGraphics(graphics);
Suggest this:
- You test this
I've just tested and everything seems ok. Good !
You can even set the line width to 0 and we are back to how it was before. Of course, line width of 0 doesn't work on Mac or Linux so it would have to be Windows only...
(Edited to include Linux)
Some comments on Archi 4.7 beta 7 on this aspect.
I can still see some small drawing issues (here at 400%):
I can also see some slight differences between 100% and other zoom factors (I guess this is because in this case we don't use translate() and other tricks.
All in all, there is nothing requesting any change in the short term. This is really acceptable for 4.7 final. I'll try to look at them for 4.7.1 or 4.8.
Arrowhead is a bit truncated on the left and is not fully filled
It was truncated before. The fill problem is because it is drawing an outline and a fill and they do not line up.
I created a new class com.archimatetool.editor.diagram.figures.connections.PathDrawnPolygonDecoration
that helps with AggregationConnectionFigure
and CompositionConnectionFigure
but for the other connections I could not resolve them. I dug deep into the code and I think there are issues to do with clipping in one of the super classes of org.eclipse.draw2d.PolylineConnection
But connections need further investigation as you say.
Let's close this and open individual issues for each individual case.
A follow up to this.
Not using scaled graphics in Archi 4.7 has made an improvement to connections that have dots/dashes when exporting to an image at scales greater than 100%, In Archi 4.6 the dots/dashes didn't scale when exporting at higher scales.
Here's an image export at 200% from Archi 4.6:
And here's the same image export at 200% from Archi 4.7:
In order to fix #621 we removed the use of the
org.eclipse.draw2d.ScaledGraphics
class. However, looking closer at some zoomed diagrams there are now new issues:Display#loadFont()
are not scaled and rendered correctly (see #628)