{"id":13777253,"url":"https://github.com/jfree/fxgraphics2d","last_synced_at":"2025-04-05T23:08:31.160Z","repository":{"id":16739091,"uuid":"19496510","full_name":"jfree/fxgraphics2d","owner":"jfree","description":"A JavaFX library that allows Java2D code (Graphics2D) to be used to draw to a Canvas node.","archived":false,"fork":false,"pushed_at":"2024-05-09T07:23:03.000Z","size":6107,"stargazers_count":208,"open_issues_count":3,"forks_count":24,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-29T22:29:48.947Z","etag":null,"topics":["java2d","javafx","javafx-library"],"latest_commit_sha":null,"homepage":"http://www.jfree.org/fxgraphics2d","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"XPRMNTL/xpr-dashboard","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-06T14:06:34.000Z","updated_at":"2024-10-15T02:26:48.000Z","dependencies_parsed_at":"2024-06-19T02:52:16.340Z","dependency_job_id":null,"html_url":"https://github.com/jfree/fxgraphics2d","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfree%2Ffxgraphics2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfree%2Ffxgraphics2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfree%2Ffxgraphics2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfree%2Ffxgraphics2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfree","download_url":"https://codeload.github.com/jfree/fxgraphics2d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java2d","javafx","javafx-library"],"created_at":"2024-08-03T18:00:40.445Z","updated_at":"2025-04-05T23:08:31.129Z","avatar_url":"https://github.com/jfree.png","language":"Java","funding_links":[],"categories":["Libraries, Tools and Projects","Community"],"sub_categories":["Libraries"],"readme":"FXGraphics2D\n============\n\nVersion 2.1.4, 12 February 2023.\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jfree/org.jfree.fxgraphics2d/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.jfree/org.jfree.fxgraphics2d)\n\nOverview\n--------\n**FXGraphics2D** is an implementation of Java's `Graphics2D` API that targets the JavaFX `Canvas`.  It makes it possible to reuse existing Java2D code in a JavaFX application.  The following example is generated by [JFreeChart-FX](https://github.com/jfree/jfreechart-fx):\n\n![FXGraphics2D sample](http://www.object-refinery.com/blog/images/fxgraphics2d_normalised.png)\n\nBackground\n----------\nThe code has been developed for the use of **Orson Charts** (https://github.com/jfree/orson-charts/) \nand **JFreeChart** (http://www.jfree.org/jfreechart).  Numerous demos can be\nfound in the [JFree-FXDemos](https://github.com/jfree/jfree-fxdemos \"JFree-FXDemos Project Page at GitHub\")\nproject page at GitHub.\n\nYou can also read about *FXGraphics2D* in this Java Magazine article:\n\n- http://www.oraclejavamagazine-digital.com/javamagazine/november_december_2014#pg63\n\nTemporary: link above is broken, please use this in the meantime:\n\n- http://www.jfree.org/fxgraphics2d/javamagazine20141112-dl.pdf\n\n*FXGraphics2D* requires JDK 11 or later and is licensed under the terms of a (three clause) BSD-style license.\n\n\nInclude\n-------\nTo include `FXGraphics2D` in your own project, add the following Maven dependency:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.jfree\u003c/groupId\u003e\n        \u003cartifactId\u003eorg.jfree.fxgraphics2d\u003c/artifactId\u003e\n        \u003cversion\u003e2.1.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\nBuild\n-----\nYou can build `FXGraphics2D` from sources using Maven:\n\n    mvn clean install\n\nTesting\n-------\nFXGraphics2D is being tested using [Graphics2D Tester](https://github.com/jfree/graphics2d-tester) and produces the output shown below.  There are several areas that still need work:\n\n- the compositing rules in `AlphaComposite` cannot be mapped 100% to JavaFX equivalents\n- font metrics are approximated\n- image drawing with clipping shows a strange greying out effect\n\n![fxgraphics2d](https://user-images.githubusercontent.com/1835893/218298599-5bcc5da1-e4ed-490a-a21d-1e8acad4fff7.png)\n\nFeedback\n--------\nIf you have feedback about the `FXGraphics2D` library, please use the [discussion area](https://github.com/jfree/fxgraphics2d/discussions).\n\nLicense\n-------\n\n`FXGraphics2D` is licensed under a BSD-style license:\n\n```\nCopyright (c) 2014-present, David Gilbert.\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, \nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, \nthis list of conditions and the following disclaimer in the documentation \nand/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors \nmay be used to endorse or promote products derived from this software without \nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" \nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\nHistory\n-------\n##### 12-Feb-2023 : Version 2.1.4\n- fixed clip handling with child Graphics2D.create() (PR #11 by Laurent Bourgès)\n- fix bug in drawArc()/fillArc()\n- set JavaFX dependency to version 19\n\n##### 23-Jan-2022 : Version 2.1.3\n- set JavaFX dependency to version 17\n- apply code clean-up suggested by IntelliJ\n\n##### 5-Aug-2021 : Version 2.1.2\n- set winding rule for `Path2D` instances;\n- set cycle method on gradient paints;\n- fix focus distance on `RadialGradientPaint`.\n\n##### 24-May-2021 : Version 2.1.1\n- fix handling for `null` arguments in `drawImage()` methods;\n- update JavaFX dependency to version 16;\n- update JUnit test dependency to 5.7.2.\n\n##### 3-Oct-2020 : Version 2.1\n- update JavaFX dependencies to version 15;\n- migrated tests to JUnit 5.\n\n##### 27-Feb-2020 : Version 2.0\n- converted to a module (`org.jfree.fxgraphics2d`);\n- now requires JDK 11 or later.\n\n##### 7-Feb-2019 : Version 1.8\n- fixed bug #8 where `draw(Shape)` alters the shape state for `RenderingHints.VALUE_STROKE_PURE`;\n- added automatic module name (`org.jfree.fxgraphics2d`).\n\n##### 5-Jul-2018 : Version 1.7\n- fixed bug #6 where color, stroke and font attributes are changed after calling `setClip()` twice.\n\n##### 5-Nov-2017 : Version 1.6\n- added support for JDK9 by removing the use of some non-public classes;\n- simplified the project set-up by removing Ant as a build option, and removing the demos (these will be provided in a separate Git project https://github.com/jfree/jfree-fxdemos).\n\n##### 15-Oct-2016 : Version 1.5\n- add rendering hint to provide option for measuring fonts via JavaFX API;\n- fix exception in `drawImage()` method with `null` transform;\n- updated JFreeSVG to version 3.2 (affects demo only).\n\n##### 27-Apr-2016 : Version 1.4\n- improve handling of `setComposite()` for alpha values;\n- fixed bug in rotate method, incorrect conversion to degrees.\n\n##### 28-Jan-2016 : Version 1.3\n- fixed bug in `drawImage()` method;\n- add 'maven' directory with a pom that can be copied over to load the project\n  in NetBeans;\n- updated Ant script to copy over `pom.xml` to distribution.\n\n##### 23-Jan-2016 : Version 1.2.1 \n- implemented `getGraphicsDevice()` method;\n- add support for dashed lines;\n- in `setPaint()` and `setStroke()`, don't update anything if the value is the same;\n- various performance fixes;\n- fixed bug in `drawImage()` method;\n- updated demos.\n\nNote that version 1.2.1 corrects a Maven dependency problem that sneaked into the 1.2 release.\n\n##### 30-Jul-2014 : Version 1.1\n- fix clipping so that combined plots in JFreeChart work correctly;\n- observe `KEY_STROKE_CONTROL` rendering hint for lines and rectangles (used to \n  sharpen gridlines and borders in JFreeChart);\n- adjust `fontRenderContext` so that glyph positioning is more precise for \n  `TextLayout`;\n- add `clearRect()` call in the JFreeChart demo;\n- add Maven support (pom.xml).\n\n##### 19-May-2014 : Version 1.0\n- initial public release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfree%2Ffxgraphics2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfree%2Ffxgraphics2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfree%2Ffxgraphics2d/lists"}