Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357342 - Issue with text display after zooming the diagram
Summary: Issue with text display after zooming the diagram
Status: CLOSED INVALID
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 01:07 EDT by samim CLA
Modified: 2012-05-31 04:55 EDT (History)
1 user (show)

See Also:


Attachments
diagram with 100% resolution (18.53 KB, image/png)
2011-09-12 09:53 EDT, samim CLA
no flags Details
Diagram 150% diagram size (40.52 KB, image/gif)
2011-09-12 09:59 EDT, samim CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description samim CLA 2011-09-12 01:07:12 EDT
Build Identifier: 0.8.0

The text letter goes missing in some containershapes  when we change the zoom percentage.

Reproducible: Always

Steps to Reproduce:
1.Create a shape with some text in it
2.Zoom the diagram to 150%
3.One or two letter may go missing from the text
Comment 1 Michael Wenz CLA 2011-09-12 04:45:11 EDT
Hm, there must be some special circumstances in your case to get that behaviour. I tried to reproduce, but was not able to do so with any of our examples. If this was a general issue I guess we would have seem more bugs like this one.

Do you have any more concrete hints how to reproduce? A (small) example would be very helpful.

Michael
Comment 2 samim CLA 2011-09-12 05:24:58 EDT
Hi,
   Please try with a polygon and a slight longer name.Set the text to center align.

(In reply to comment #1)
> Hm, there must be some special circumstances in your case to get that
> behaviour. I tried to reproduce, but was not able to do so with any of our
> examples. If this was a general issue I guess we would have seem more bugs like
> this one.
> 
> Do you have any more concrete hints how to reproduce? A (small) example would
> be very helpful.
> 
> Michael
Comment 3 Michael Wenz CLA 2011-09-12 09:28:28 EDT
Sorry, but after playing around with a Polygons and Texts that just fit into I'm still puzzled...
Could you append a screenshot and maybe a snippet that creates the shape?

Michael
Comment 4 samim CLA 2011-09-12 09:53:15 EDT
Created attachment 203159 [details]
diagram with 100% resolution

This is a diagram with 100% resolution.
Comment 5 samim CLA 2011-09-12 09:59:11 EDT
Created attachment 203160 [details]
Diagram 150% diagram size

This diagram has 150 resolution and you can see the 'S' is not there in the word PROCES in the 150% resolution diagram
Comment 6 Michael Wenz CLA 2011-09-15 06:34:02 EDT
Thanks, I can see the effect on the screenshot. It might also be caused by a to small text object in the diagram (scaling during resize might make parts disappear). How is the size of the text field calculated?
Comment 7 samim CLA 2011-10-10 06:05:35 EDT
Hi ,
   Sorry for the late reply.The resize is not done by us.Its provided at the top of the workbench.So its not handled by us.It happens only in 150% zoom and in no other values.
Comment 8 Michael Wenz CLA 2011-10-12 06:49:47 EDT
(In reply to comment #7)
> Hi ,
>    Sorry for the late reply.The resize is not done by us.Its provided at the
> top of the workbench.So its not handled by us.It happens only in 150% zoom and
> in no other values.
This was a slight misunderstanding, I think. I was asking about how the size of the text graphics algorithm is calculated? So, this is about the text field in the diagram holding the test the'S' is missing.
Comment 9 samim CLA 2011-10-12 07:36:20 EDT
This is the code we use in AddXYZfeture class which extends from AbstractAddShapefeture.

Shape shape = peCreateService.createShape(containerShape, false);
MultiText text = null;
// create and set text graphics algorithm for PC Name

text = gaService.createDefaultMultiText(getDiagram(), shape, name);
		
 text.setForeground(manageColor(PROCESS_COMPONENT_TEXT_FOREGROUND));
 text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
 text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
 text.getFont().setBold(true);
gaService.setLocationAndSize(text, 0, 0, width, height);
		
// create link and wire it

link(shape, addedPC);
Comment 10 Michael Wenz CLA 2011-10-12 08:58:30 EDT
(In reply to comment #9)
> gaService.setLocationAndSize(text, 0, 0, width, height);
Ok, thanks. And where do width and height come from? How are they calculated?
Comment 11 Michael Wenz CLA 2012-05-31 04:55:13 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > gaService.setLocationAndSize(text, 0, 0, width, height);
> Ok, thanks. And where do width and height come from? How are they calculated?

Since you haven't replied for a rather long time, I close this bugzilla. Simply reopen it in case the topic is still valid.