Opened 7 years ago

Closed 7 years ago

#4490 closed defect (fixed)

Display issues with Modelica Trunk

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: high Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc:

Description

MSL trunk contains changes in the way some icons are displayed.
For instance MSL 3.2.2 RealExpression icon contains:

        Rectangle(
          extent={{-100,40},{100,-40}},
          lineColor={0,0,0},
          lineThickness=5.0,
          fillColor={235,235,235},
          fillPattern=FillPattern.Solid,
          borderPattern=BorderPattern.Raised),

Since lineTickness=0.5 was too big this code has been changed into:

       Rectangle(
          extent={{-100,40},{100,-40}},
          fillColor={235,235,235},
          fillPattern=FillPattern.Solid,
          borderPattern=BorderPattern.Raised),

But this is badly displayed by OMEdit: the rectangle border line is partially displayed, depending on the position of the component on screen and the zoom level. In some cases no rectangle is visible.
The final result is ugly (compare MSL.png with trunk.png)
Since AFAIK all the models involved by this recent modifications have borderPattern=BorderPattern.Raised, maybe the issue depends on this parameter?
Is this an OMEdit or a MSL (trunk) issue?

Attachments (2)

Trunk.png (22.5 KB ) - added by massimo ceraolo 7 years ago.
MSL.png (19.2 KB ) - added by massimo ceraolo 7 years ago.

Download all attachments as: .zip

Change History (7)

by massimo ceraolo, 7 years ago

Attachment: Trunk.png added

by massimo ceraolo, 7 years ago

Attachment: MSL.png added

comment:1 by Adeel Asghar, 7 years ago

Component: *unknown*OMEdit
Owner: changed from somebody to Adeel Asghar
Status: newaccepted

This is an OMEdit issue.

I think we should use anti-aliasing to avoid such issues with lines of very small thickness.

comment:2 by massimo ceraolo, 7 years ago

Just a curiosity,
since no value is explicitly set, thickness is the same as other standard components such s blocks, shouldn't it? Why the issue shows up only here?

comment:3 by Adeel Asghar, 7 years ago

I guess its because of different scaling we get from the its extents. Mostly others are squares.

comment:4 by massimo ceraolo, 7 years ago

But resizing shapes should not resize line thickness. The default line width is 0.25 mm, i.e. one pixel on a standard (96dpi) screen.
Also on Macs, which by standard have 72 dpi, 0.25 mm should correspond, rounding to the nearest integer and without anti-alising, to one pixel.
I suppose here there is something different.

comment:5 by Adeel Asghar, 7 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in 47db56/OMEdit.

Note: See TracTickets for help on using tickets.