Issue 121237 - Region does not completely support B2DPolygons
Summary: Region does not completely support B2DPolygons
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 121425
  Show dependency tree
 
Reported: 2012-10-19 12:16 UTC by Armin Le Grand
Modified: 2013-07-12 16:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Armin Le Grand 2012-10-19 12:16:20 UTC
ALG: Checked the Region code in vcl when chekcing another task, found out that the implementation is not complete in various places for supporting double-precision B2DPoly/Polygon definitions.
Comment 1 Armin Le Grand 2012-10-19 12:16:54 UTC
ALG: Taking over.
The region code needs some refactoring anyways. Taking a look...
Comment 2 Armin Le Grand 2012-10-19 15:18:37 UTC
ALG:
- Isolated the original old RegionBand code to own class and files
- removed impl stuff, added the four possible contents as shared_ptr
- content can be B2DPolyPolygon, PolyPolygon, RegionBand or null region
- null region is an internal bool flag now
- Removed RegionType define, replaced with simpler methodologies
- The three content data build a hierarchy, B2DPolyPolygon is the highest quality (double), PolyPolygon the second (long) and RegionBand the third
- All are convertable to each other, with same quality upwards and decresing quality downwards
- Operations try to prefer the highest quality internal operation, on demand convert content. That content is buffered and reused in the other shared_ptr's
- Removed and globally replaced the BeginEnumRects/GetEnumRects/EndEnumRects mechanism to get a vector of Rectangles and use that; the old one internally copied the RegionBands anyways, probably because getting one after the other lead to consistency problems in some cases. This cannot happen with getting the whole Rectangle vector at one defined time as a whole
- Removed a lot unused stuff from RegionBands
- Checked on Win and Linux (build and functionality)

Doing some more tests...
Comment 3 Armin Le Grand 2012-10-22 15:27:05 UTC
ALG: Did some more checks and corrections, doing a complete rebuild right now for doing more tests...
Comment 4 Armin Le Grand 2012-10-23 09:45:23 UTC
ALG: Okay, done. Did more basic tests, looks good. Preparing commit.
Comment 5 SVN Robot 2012-10-23 13:46:53 UTC
"alg" committed SVN revision 1401294 into trunk:
#121237# Rework/Cleanup of Region code due to missing complete support for B2...
Comment 6 Armin Le Grand 2012-10-23 13:47:20 UTC
ALG: Comitted, done.
Comment 7 SVN Robot 2012-10-25 09:36:27 UTC
"alg" committed SVN revision 1402041 into trunk:
#121237# Corrected Region export, was missing to write an end marker when Reg...
Comment 8 Armin Le Grand 2012-10-25 09:38:01 UTC
ALG: Corrected one error in streaming Region, in the case of no RegionBand, the old implementation wrote an end marker (STREAMENTRY_END). This needs to be emulated to stay compatible.
Comment 9 Li Feng Wang 2012-11-08 09:02:20 UTC
Can't verify from user view.
Comment 10 binguo 2012-12-14 09:12:06 UTC
Latest build is Aoo_Trunk_20121207.1915 Rev.1413470, marked is as verified.
Comment 11 binguo 2012-12-14 09:12:21 UTC
close it