{"id":16569885,"url":"https://github.com/imagingbook/jgraphix","last_synced_at":"2025-07-08T08:05:56.415Z","repository":{"id":109652723,"uuid":"111194968","full_name":"imagingbook/JGraphix","owner":"imagingbook","description":"Simple setup for drawing 2D graphics in Java","archived":false,"fork":false,"pushed_at":"2018-11-25T05:32:12.000Z","size":270,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T12:47:57.337Z","etag":null,"topics":["awt","education","graphics","java","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imagingbook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-11-18T10:06:19.000Z","updated_at":"2018-11-25T05:32:13.000Z","dependencies_parsed_at":"2023-03-23T18:05:16.900Z","dependency_job_id":null,"html_url":"https://github.com/imagingbook/JGraphix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imagingbook/JGraphix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagingbook%2FJGraphix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagingbook%2FJGraphix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagingbook%2FJGraphix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagingbook%2FJGraphix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imagingbook","download_url":"https://codeload.github.com/imagingbook/JGraphix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagingbook%2FJGraphix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264229252,"owners_count":23576239,"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":["awt","education","graphics","java","swing"],"created_at":"2024-10-11T21:15:29.140Z","updated_at":"2025-07-08T08:05:56.377Z","avatar_url":"https://github.com/imagingbook.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JGraphix \u0026ndash; a simple setup for drawing 2D graphics in Java\n\nThough drawing graphics in Java is fairly easy, setting up everything right\ncan be a real challenge (not only) for beginning programmers.\nThis package provides a simple setup for performing non-interactive drawing\noperations in Java and makes it extremely easy to get started with graphics. \nNo need to know about listeners, callbacks, threads or similar advanced concepts.\nThe software is intended for educational (student) use and thus neither safe nor\nrecommended for real applications. The implementation is based on Swing and AWT \ngraphics. All standard AWT graphics operations can be used (see the\n\u003ca href=\"https://docs.oracle.com/javase/8/docs/api/index.html?java/awt/Graphics.html\"\u003eGraphics\u003c/a\u003e \nand\n\u003ca href=\"https://docs.oracle.com/javase/8/docs/api/index.html?java/awt/Graphics2D.html\"\u003eGraphics2D\u003c/a\u003e \nAPI documentation for details).\nThe rendered screen graphics can be saved to a PNG file by pressing\nCtrl-s (Windows) or Cmd-s (MacOS) on the open window.\n\n![Example 1](docs/img/example1-framed.png)\n![Example 4](docs/img/example4.png)\n\n\n\n## Installation\n\n* **Option 1:** Download the JAR file from [jars/](https://github.com/imagingbook/JGraphix/tree/master/jars)\nand add it to your Java project (add to build path).\n* **Option 2:** Clone this repository and open the contained (Eclipse) project.\n\nRequires Java 1.7 or higher.\n\n## Typical Usage\n\n````\nimport java.awt.Color;\nimport java.awt.Font;\nimport java.awt.Graphics2D;\nimport java.awt.geom.Line2D;\n\nimport imagingbook.jgraphix.DrawFrame;\n\n...\n\nDrawFrame df = DrawFrame.create();\nGraphics2D g = df.getGraphics2D();\n   \ng.setStroke(new BasicStroke(5));\ng.setColor(Color.blue);\n   \ng.drawLine(40, 10, 10, 40);\ng.fillOval(10, 60, 30, 30);\ng.drawOval(60, 60, 30, 30);\ndf.refresh();\t// display drawing\n \ndf.clear();\t// erase drawing\ng.setColor(Color.green);\ng.fillRoundRect(110, 60, 30, 30, 10, 10);\ng.drawRoundRect(160, 60, 30, 30, 10, 10);\ndf.refresh();\t// display drawing\n...  \n````\n\n## More Examples\nhttps://github.com/imagingbook/JGraphix/tree/master/examples\n\n## Documentation\nhttps://imagingbook.github.io/JGraphix/javadoc/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagingbook%2Fjgraphix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimagingbook%2Fjgraphix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagingbook%2Fjgraphix/lists"}