SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Share and Enjoy!
Alexander Nyßen
itemis AG
4
Continue to
GEF 3.x / Zest 1.x
• Mature project with quite long history
• Base technology with lot's of users (direct & indirect through
GMF/Graphiti)
• Stable API, no breaking API changes since 2004 (GEF 3.0)
• Ready for CBI (migration to Git, Maven/Tycho completed)
• But API is organically evolved and there are ~400
bugzillas, out of which several require to break it
SomeTopics for a Renewal
• Re-thinking current componentization
• Support for the E4 application model
• Support for rotation and other transformations
• Support for curved connections
• Support for other rendering platforms than SWT
• Multi-touch gestures support
• Revision of the command framework
• Revision of connection handling (clipping container)
• Various renamings and restructurings on the detail level...
Zest 2 (since 2010)
• A provisional Zest 2 component was initiated in 2010, to
develop the next generation Zest API.
• Goal was to develop a new version of Zest in parallel to the
maintenance of Zest 1.x., with an - up to the final
graduation - provisional API
• Sources were intended to be placed in its own Zest2 Git
repository, results were published separately via Eclipse
Marketplace.
GEF4 (since 2011)
• GEF4 was initiated - in analogy to Zest 2 - to develop the next
generation Draw2d and GEF (MVC) API.
• Similar to Zest2, development was intended to take place in
parallel to maintenance of Draw2d / GEF (MVC) 3.x
• Initial plans (prior to 3.8):
• Create new double-precision Geometry API before Juno
release.
• Start to migrate the Draw2d and GEF (MVC) code base on a
step-by-step basis afterwards.
GEF4 + Zest 2 = GEF4
Modified plan: 

Unification of both approaches after Juno!
GEF4 - A Unified Approach
• A unified approach with a shared code base and a
common namespace (org.eclipse.gef4) for all plug-ins.
• Advantages:
• Clear distinction between GEF proper as the production
component and GEF4 as the provisional one
• Chance to not only refactor GEF components but the
componentization itself, which is only "historically" justified.
GEF4 - Status Quo
• GEF4 Geometry component was initiated in 2011, work has been
finalized with the Juno release:
• Functionally complete (at least for now)
• 344 JUnit tests, ~77% instruction coverage
• GEF4 Graphics component was initiated directly after Juno and is
currently under work:
• Functionally nearly complete for SWT/AWT, intended JavaFX adoption
about to start
• Still limited tests and quite a bit of adjustment needed w.r.t. "platform-
specific" issues of SWT
GEF4 - Status Quo (continued)
• GEF4 Zest was transferred to Git repository (and update-
site) but not yet adopted:
• Zest2 plug-ins were renamed to org.eclipse.gef4.zest.*
• Dependencies on Draw2d 3.x still have to be factored out
GEF4 Geometry
• No distinction in low and high precision, but just a single double-precision
API (with built-in imprecision for comparisons).
• Different geometric abstractions for different purposes:
• Euclidean (Vector, Straight,Angle)
• Projective (Vector3D, Straight3D)
• Planar (Point, Dimension, Line, QuadraticCurve, CubicCurve,
BezierCurve, Polyline, PolyBezier, Ellipse, Rectangle, Pie,Arc, Polygon,
CurvedPolygon, RoundedRectangle, Ring, Region, Path)
• Conversions to/from AWT and SWT (and between them)
GEF4 Planar Geometry - Features
• Support for "non-standard" geometries:
• Arbitrary Bezier curves, curved polygons
• Approximation via BezierCurves & Interpolation via PolyBeziers
• Characteristics-related core abstractions (IGeometry, ICurve, IShape,
IMultiShape)
• Construction-related base-classes (AbstractRectangleBased-
Geometry,AbstractPointListBasedGeometry,...)
• Direct support for affine transformations (ITranslatable, IScalable,
IRotatable)
• No direct SWT dependencies (SWT-related conversions bundled in
optional plug-in)
GEF4 Planar Geometry - Overview
GEF4 Planar Geometry - Abstractions
GEF4 Planar Geometry - Base Classes
GEF4 Geometry - Examples
GEF4 Geometry - Sample Code
// Bezier approximation of curves
BezierCurve[] fromCurve = curve.toBezier();
BezierCurve[] fromShape = shape.getOutline().toBezier();
ICurve[] fromPolyShape = polyShape.getOutlineSegments();
List<BezierCurve> beziers = new ArrayList<BezierCurve>();
for (ICurve c : fromPolyShape)
beziers.addAll(Arrays.asList(c.toBezier()));
// PolyBezier interpolation
PolyBezier interpolation = PolyBezier.interpolateCubic(p0, p1, p2, p3, ...);
// support for affine transformations
Polygon rhomb = new Rectangle(10, 10, 10, 10).getRotatedCCW(Angle.fromDeg(45));
PolyBezier slanted = new Ellipse(100, 100, 100, 50).getRotatedCCW(Angle.fromDeg(30));
Ring rotatedClippingArea = region.getRotatedCCW(Angle.fromDeg(300));
GEF4 Graphics
• Support for rendering (planar) geometries, images, and text
on an underlying Canvas/Graphics
• Key abstractions (Font, Image, Color) and transparent
support for multiple widget toolkits (SWT,AWT, JavaFX*)
• Save push/pop/restore and get/set of graphics state
• Combinations of advanced graphics features like xor-mode,
patterns (color, gradient, image), affine transformations, etc.
• Extensible image processing support (Pixel-Filter, Channel-
Filter, Convolution-Filter)
*) Graphics based on JavaFX Canvas API already prototyped byTom Schindl
GEF4 Graphics - Features
GEF4 Graphics - Overview
GEF4 Graphics - Examples
GEF4 Graphics - Sample Code
// prepare geometries
final Ellipse ellipse = new Ellipse(50, 50, 350, 200);
final Rectangle rectangle = new Rectangle(100, 160, 125, 220);
final Polygon triangle = new Polygon(260, 170, 190, 300, 330, 300);
// prepare colors
final Color red = new Color(255, 0, 0);
final Color darkRed = new Color(128, 0, 0);
final Color blue = new Color(0, 0, 255);
final Color green = new Color(0, 255, 0);
final Color darkGreen = new Color(0, 128, 0);
g.setLineWidth(4);
g.pushState(); // save the current set of properties on the stack
g.setFill(red).setDraw(darkRed).setDashArray(25, 10);
g.fill(ellipse).draw(ellipse.getOutline());
g.restoreState(); // restore the previously saved properties
g.setFill(blue).setLineJoin(LineJoin.ROUND).setLineCap(LineCap.ROUND);
g.fill(rectangle).draw(rectangle.getOutline());
g.popState(); // removes the previously saved properties from the stack
// and enables the properties that were set in advance
g.setFill(green).setDraw(darkGreen).setLineJoin(LineJoin.MITER);
g.fill(triangle).draw(triangle.getOutline());
GEF4 Graphics - More Sample Code
• Java2D:
• GEF4 Graphics (Java2D & SWT):
g2d.translate(50, 50);
g2d.setPaint(new RadialGradientPaint(new Point(50, 50), 50, new Point(
40, 40), new float[] { 0, .5f, 1 }, new Color[] {
new Color(255, 255, 255), new Color(255, 0, 0),
new Color(0, 0, 0) }, CycleMethod.REFLECT));
g2d.fill(new Rectangle(0, 0, 200, 200));
g.translate(50, 50);
Ellipse ellipse = new Ellipse(0, 0, 100, 100);
g.setFill(new Gradient.Radial(ellipse, ellipse
.getCenter().translate(-10, -10), CycleMode.REFLECT)
.addStop(0.0, new Color(255, 255, 255))
.addStop(0.5, new Color(255, 0, 0))
.addStop(1.0, new Color(0, 0, 0)));
g.fill(new Rectangle(0, 0, 200, 200));
GEF4 - Outlook (Mid-Term)
• GEF4 Layouts is planned:
• Data model for layout computations (based on Draw2d/
Zest DirectedGraphLayout)
• Set of layout algorithms based on it (Draw2d & Zest)
• GEF4 'Glyphs' is planned:
• Figures/Shapes abstractions inspired by Draw2d, SVG, and
JavaFX (SceneGraph)
• Intended as replacement of Draw2d 'core'
GEF4 - Outlook (Long-Term)
• Adoption of migrated Zest components to new GEF4
Geometry, Graphics, Canvas, Layouts components
• Migration of remaining Draw2d/GEF (MVC) code base,
including re-modularization and adoption
Share & Enjoy - Please get involved!
• Evaluate and Provide Feedback!
• Try out early snapshots!
• Report bugs, report enhancement requests!
• Contribute!
• Participate in discussions (bugzilla, mailing list)
• Supply patches
ThankYou! Questions?
http://wiki.eclipse.org/GEF/GEF4

Más contenido relacionado

Similar a GEF4 - Continue to Share and Enjoy!

SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
Sébastien Levert
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLAS
Jongsu "Liam" Kim
 

Similar a GEF4 - Continue to Share and Enjoy! (20)

The Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing FrameworkThe Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing Framework
 
Gephi Toolkit Tutorial
Gephi Toolkit TutorialGephi Toolkit Tutorial
Gephi Toolkit Tutorial
 
Introduction to Griffon
Introduction to GriffonIntroduction to Griffon
Introduction to Griffon
 
dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.
 
Griffon Presentation
Griffon PresentationGriffon Presentation
Griffon Presentation
 
Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization release
 
Porting legacy apps to Griffon
Porting legacy apps to GriffonPorting legacy apps to Griffon
Porting legacy apps to Griffon
 
State of GeoServer 2015
State of GeoServer 2015State of GeoServer 2015
State of GeoServer 2015
 
Creating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartCreating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChart
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
 
Decentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsDecentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF Graphs
 
SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLAS
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
JSF2
JSF2JSF2
JSF2
 
Introducing E-Cell 3.2
Introducing E-Cell 3.2Introducing E-Cell 3.2
Introducing E-Cell 3.2
 
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Último (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 

GEF4 - Continue to Share and Enjoy!

  • 1. Share and Enjoy! Alexander Nyßen itemis AG 4 Continue to
  • 2. GEF 3.x / Zest 1.x • Mature project with quite long history • Base technology with lot's of users (direct & indirect through GMF/Graphiti) • Stable API, no breaking API changes since 2004 (GEF 3.0) • Ready for CBI (migration to Git, Maven/Tycho completed) • But API is organically evolved and there are ~400 bugzillas, out of which several require to break it
  • 3. SomeTopics for a Renewal • Re-thinking current componentization • Support for the E4 application model • Support for rotation and other transformations • Support for curved connections • Support for other rendering platforms than SWT • Multi-touch gestures support • Revision of the command framework • Revision of connection handling (clipping container) • Various renamings and restructurings on the detail level...
  • 4. Zest 2 (since 2010) • A provisional Zest 2 component was initiated in 2010, to develop the next generation Zest API. • Goal was to develop a new version of Zest in parallel to the maintenance of Zest 1.x., with an - up to the final graduation - provisional API • Sources were intended to be placed in its own Zest2 Git repository, results were published separately via Eclipse Marketplace.
  • 5. GEF4 (since 2011) • GEF4 was initiated - in analogy to Zest 2 - to develop the next generation Draw2d and GEF (MVC) API. • Similar to Zest2, development was intended to take place in parallel to maintenance of Draw2d / GEF (MVC) 3.x • Initial plans (prior to 3.8): • Create new double-precision Geometry API before Juno release. • Start to migrate the Draw2d and GEF (MVC) code base on a step-by-step basis afterwards.
  • 6. GEF4 + Zest 2 = GEF4 Modified plan: 
 Unification of both approaches after Juno!
  • 7. GEF4 - A Unified Approach • A unified approach with a shared code base and a common namespace (org.eclipse.gef4) for all plug-ins. • Advantages: • Clear distinction between GEF proper as the production component and GEF4 as the provisional one • Chance to not only refactor GEF components but the componentization itself, which is only "historically" justified.
  • 8. GEF4 - Status Quo • GEF4 Geometry component was initiated in 2011, work has been finalized with the Juno release: • Functionally complete (at least for now) • 344 JUnit tests, ~77% instruction coverage • GEF4 Graphics component was initiated directly after Juno and is currently under work: • Functionally nearly complete for SWT/AWT, intended JavaFX adoption about to start • Still limited tests and quite a bit of adjustment needed w.r.t. "platform- specific" issues of SWT
  • 9. GEF4 - Status Quo (continued) • GEF4 Zest was transferred to Git repository (and update- site) but not yet adopted: • Zest2 plug-ins were renamed to org.eclipse.gef4.zest.* • Dependencies on Draw2d 3.x still have to be factored out
  • 10. GEF4 Geometry • No distinction in low and high precision, but just a single double-precision API (with built-in imprecision for comparisons). • Different geometric abstractions for different purposes: • Euclidean (Vector, Straight,Angle) • Projective (Vector3D, Straight3D) • Planar (Point, Dimension, Line, QuadraticCurve, CubicCurve, BezierCurve, Polyline, PolyBezier, Ellipse, Rectangle, Pie,Arc, Polygon, CurvedPolygon, RoundedRectangle, Ring, Region, Path) • Conversions to/from AWT and SWT (and between them)
  • 11. GEF4 Planar Geometry - Features • Support for "non-standard" geometries: • Arbitrary Bezier curves, curved polygons • Approximation via BezierCurves & Interpolation via PolyBeziers • Characteristics-related core abstractions (IGeometry, ICurve, IShape, IMultiShape) • Construction-related base-classes (AbstractRectangleBased- Geometry,AbstractPointListBasedGeometry,...) • Direct support for affine transformations (ITranslatable, IScalable, IRotatable) • No direct SWT dependencies (SWT-related conversions bundled in optional plug-in)
  • 12. GEF4 Planar Geometry - Overview
  • 13. GEF4 Planar Geometry - Abstractions
  • 14. GEF4 Planar Geometry - Base Classes
  • 15. GEF4 Geometry - Examples
  • 16. GEF4 Geometry - Sample Code // Bezier approximation of curves BezierCurve[] fromCurve = curve.toBezier(); BezierCurve[] fromShape = shape.getOutline().toBezier(); ICurve[] fromPolyShape = polyShape.getOutlineSegments(); List<BezierCurve> beziers = new ArrayList<BezierCurve>(); for (ICurve c : fromPolyShape) beziers.addAll(Arrays.asList(c.toBezier())); // PolyBezier interpolation PolyBezier interpolation = PolyBezier.interpolateCubic(p0, p1, p2, p3, ...); // support for affine transformations Polygon rhomb = new Rectangle(10, 10, 10, 10).getRotatedCCW(Angle.fromDeg(45)); PolyBezier slanted = new Ellipse(100, 100, 100, 50).getRotatedCCW(Angle.fromDeg(30)); Ring rotatedClippingArea = region.getRotatedCCW(Angle.fromDeg(300));
  • 17. GEF4 Graphics • Support for rendering (planar) geometries, images, and text on an underlying Canvas/Graphics • Key abstractions (Font, Image, Color) and transparent support for multiple widget toolkits (SWT,AWT, JavaFX*) • Save push/pop/restore and get/set of graphics state • Combinations of advanced graphics features like xor-mode, patterns (color, gradient, image), affine transformations, etc. • Extensible image processing support (Pixel-Filter, Channel- Filter, Convolution-Filter) *) Graphics based on JavaFX Canvas API already prototyped byTom Schindl
  • 18. GEF4 Graphics - Features
  • 19. GEF4 Graphics - Overview
  • 20. GEF4 Graphics - Examples
  • 21. GEF4 Graphics - Sample Code // prepare geometries final Ellipse ellipse = new Ellipse(50, 50, 350, 200); final Rectangle rectangle = new Rectangle(100, 160, 125, 220); final Polygon triangle = new Polygon(260, 170, 190, 300, 330, 300); // prepare colors final Color red = new Color(255, 0, 0); final Color darkRed = new Color(128, 0, 0); final Color blue = new Color(0, 0, 255); final Color green = new Color(0, 255, 0); final Color darkGreen = new Color(0, 128, 0); g.setLineWidth(4); g.pushState(); // save the current set of properties on the stack g.setFill(red).setDraw(darkRed).setDashArray(25, 10); g.fill(ellipse).draw(ellipse.getOutline()); g.restoreState(); // restore the previously saved properties g.setFill(blue).setLineJoin(LineJoin.ROUND).setLineCap(LineCap.ROUND); g.fill(rectangle).draw(rectangle.getOutline()); g.popState(); // removes the previously saved properties from the stack // and enables the properties that were set in advance g.setFill(green).setDraw(darkGreen).setLineJoin(LineJoin.MITER); g.fill(triangle).draw(triangle.getOutline());
  • 22. GEF4 Graphics - More Sample Code • Java2D: • GEF4 Graphics (Java2D & SWT): g2d.translate(50, 50); g2d.setPaint(new RadialGradientPaint(new Point(50, 50), 50, new Point( 40, 40), new float[] { 0, .5f, 1 }, new Color[] { new Color(255, 255, 255), new Color(255, 0, 0), new Color(0, 0, 0) }, CycleMethod.REFLECT)); g2d.fill(new Rectangle(0, 0, 200, 200)); g.translate(50, 50); Ellipse ellipse = new Ellipse(0, 0, 100, 100); g.setFill(new Gradient.Radial(ellipse, ellipse .getCenter().translate(-10, -10), CycleMode.REFLECT) .addStop(0.0, new Color(255, 255, 255)) .addStop(0.5, new Color(255, 0, 0)) .addStop(1.0, new Color(0, 0, 0))); g.fill(new Rectangle(0, 0, 200, 200));
  • 23. GEF4 - Outlook (Mid-Term) • GEF4 Layouts is planned: • Data model for layout computations (based on Draw2d/ Zest DirectedGraphLayout) • Set of layout algorithms based on it (Draw2d & Zest) • GEF4 'Glyphs' is planned: • Figures/Shapes abstractions inspired by Draw2d, SVG, and JavaFX (SceneGraph) • Intended as replacement of Draw2d 'core'
  • 24. GEF4 - Outlook (Long-Term) • Adoption of migrated Zest components to new GEF4 Geometry, Graphics, Canvas, Layouts components • Migration of remaining Draw2d/GEF (MVC) code base, including re-modularization and adoption
  • 25. Share & Enjoy - Please get involved! • Evaluate and Provide Feedback! • Try out early snapshots! • Report bugs, report enhancement requests! • Contribute! • Participate in discussions (bugzilla, mailing list) • Supply patches