Bug 213418 - New getRegionData() API on Region
Summary: New getRegionData() API on Region
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3.1   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 03:08 EST by Manuel Selva CLA
Modified: 2019-09-24 13:58 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Selva CLA 2007-12-19 03:08:46 EST
It would be nice to have an API allowing clients to retrieve all the polygons composing a region. Actually Region can be defined using polygon and then using intersection operations but after these operations client can't retrieve the new Region as a set of polygons.


Here is the explanation why i need such a feature :

I am writing an application drawing plots in an SWT composite. The user can zoom and scroll in these plots. As a result of zooming in the x-scale grows up. For example for a given series i have 4 visible points (connected with straight lines) for a given Zoom Factor and after several zoom in i only have 1 visible point. Nevertheless i need to connect this visible point to the next point, that is invisible. So i ask SWT to draw a line between these two points. Depending on the scale the next visible point can be far far far away from the visible point.

This results sometimes in drawing a line between (125, 45) and (34000, 547) for example. When the second point X coordinate exceed 2^15 (16 bit limitation) we have rendering problems. Here we can't rely on GC clipping.

A solution to this problem consists in computing the visible part of the line in order to ask SWT to only draw this part. This problem also occurs when my series are filled as polygon and this is why i need Region.getData in order to easily ask to SWT to only draw the intersection of my polygon and the composite client area.


The native call to get the data on Windows is "GetRegionData".

Manu

PS : the following bug is related to this issue

https://bugs.eclipse.org/bugs/show_bug.cgi?id=146179
Comment 1 Steve Northover CLA 2007-12-20 10:17:05 EST
We should do this, providing there is operating system support on the platforms.
Comment 2 Manuel Selva CLA 2007-12-20 10:55:35 EST
Hi Steve,

In fact i need this in order to solve a GTK 16 bit limitation, so my question is, does Gtk support it ? (the answer seems to be NO after q quick reading of their APi, am i right ?)

Manu

Comment 3 Steve Northover CLA 2007-12-20 11:08:43 EST
Bogdan will take a look.
Comment 4 Lars Vogel CLA 2019-09-24 13:58:04 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.