{"id":13575472,"url":"https://github.com/eseifert/vectorgraphics2d","last_synced_at":"2025-04-04T09:08:21.656Z","repository":{"id":27404257,"uuid":"30881009","full_name":"eseifert/vectorgraphics2d","owner":"eseifert","description":"Graphics2D implementations to export various vector file formats","archived":false,"fork":false,"pushed_at":"2024-10-02T05:39:09.000Z","size":1087,"stargazers_count":108,"open_issues_count":17,"forks_count":28,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-31T12:13:29.457Z","etag":null,"topics":["eps","hacktoberfest","hacktoberfest2022","java","java-library","java2d","pdf","pdf-generation","svg"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eseifert.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","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":"2015-02-16T18:07:00.000Z","updated_at":"2024-10-02T05:39:14.000Z","dependencies_parsed_at":"2024-10-25T18:31:44.896Z","dependency_job_id":null,"html_url":"https://github.com/eseifert/vectorgraphics2d","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eseifert%2Fvectorgraphics2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eseifert%2Fvectorgraphics2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eseifert%2Fvectorgraphics2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eseifert%2Fvectorgraphics2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eseifert","download_url":"https://codeload.github.com/eseifert/vectorgraphics2d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"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":["eps","hacktoberfest","hacktoberfest2022","java","java-library","java2d","pdf","pdf-generation","svg"],"created_at":"2024-08-01T15:01:01.414Z","updated_at":"2025-04-04T09:08:21.626Z","avatar_url":"https://github.com/eseifert.png","language":"Java","readme":".. image:: https://eseifert.github.io/vectorgraphics2d/logo.png\n\n.. image:: https://travis-ci.org/eseifert/vectorgraphics2d.svg?branch=master\n    :target: https://travis-ci.org/eseifert/vectorgraphics2d\n\nThis project is archived.\nVectorGraphics2D has been relicensed under EPL-2.0 and subsequently integrated\ninto `Eclipse SWTChart \u003chttps://projects.eclipse.org/projects/science.swtchart\u003e`_\n(`GitHub \u003chttps://github.com/eclipse/swtchart\u003e`_)\n\nVectorGraphics2D\n================\n\nVectorGraphics2D provides implementations of Java's ``Graphics2D`` interface and\nexports the graphics in various vector file formats.\nCurrently, there's support for the following vector file formats:\n\n- Encapsulated PostScript® (EPS)\n- Scalable Vector Graphics (SVG)\n- Portable Document Format (PDF)\n\nAdditional formats can be easily added.\n\n\nFeatures\n--------\n\n- Support for EPS, PDF, and SVG formats\n- Rendering of all geometric shapes provided by the java.awt.Graphics2D interface\n- Shapes and text can be made transparent (except in EPS)\n- Arbitrary clipping paths can be defined\n- Output of bitmap images\n- Easily extensible\n- Small footprint (JAR is below 100 kilobytes)\n\nCurrently, most operations are supported, i.e. VectorGraphics2D is able to handle clipping gradients, or compression.\nSome features are still missing, like text encodings, embedded fonts, or metadata support.\nAlthough its early stage VectorGraphics2D is already used successfully in several projects to export vector graphics.\n\nRequirements\n============\n\nVectorGraphics2D requires at least Java 8 and Gradle 5 or higher to build.\n\nInstallation\n============\n\nWithout build management system\n-------------------------------\n\nYou can just add ``VectorGraphics2D-0.13.jar`` to the classpath of your project.\n\nUsing VectorGraphics2D with Gradle\n----------------------------------\n\n.. code:: groovy\n    dependencies {\n        compile group: 'de.erichseifert.vectorgraphics2d', name: 'VectorGraphics2D', version: '0.13'\n    }\n\nUsage\n=====\n\nA ``VectorGraphics2D`` object can be used as a replacement for a ``Graphics2D``\nobject. All calls to the ``VectorGraphics2D`` instance will be recorded and can\nlater be retrieved as a ``CommandSequence``:\n\n.. code:: java\n\n    Graphics2D vg2d = new VectorGraphics2D();\n    vg2d.draw(new Rectangle2D.Double(0.0, 0.0, 20.0, 20.0));\n    CommandSequence commands = ((VectorGraphics2D) vg2d).getCommands();\n\nThis command sequence can then be exported to a EPS, PDF or SVG document using\na processor for the desired file type, i.e. ``EPSProcessor`` for EPS,\n``PDFProcessor`` for PDF and ``SVGProcessor`` for SVG. Additionally, format\nspecific output options can be passed to the processor when it is created.\nFor example, a compression option can be passed for PDF:\n\n.. code:: java\n\n    PDFProcessor pdfProcessor = new PDFProcessor(true);\n\nAnother method to get a processor is ``Processors.get(String)``:\n\n.. code:: java\n\n    Processor pdfProcessor = Processors.get(\"pdf\");\n\nFinally, a document can be generated from the commands and written to an output\nstream:\n\n.. code:: java\n\n    Document doc = pdfProcessor.getDocument(commands, PageSize.A4);\n    doc.writeTo(new FileOutputStream(\"rect.pdf\"));\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feseifert%2Fvectorgraphics2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feseifert%2Fvectorgraphics2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feseifert%2Fvectorgraphics2d/lists"}