{"id":13599886,"url":"https://github.com/embedded-graphics/embedded-graphics","last_synced_at":"2025-08-29T18:04:09.101Z","repository":{"id":37823710,"uuid":"120315888","full_name":"embedded-graphics/embedded-graphics","owner":"embedded-graphics","description":"A no_std graphics library for embedded applications","archived":false,"fork":false,"pushed_at":"2025-08-27T20:20:35.000Z","size":6643,"stargazers_count":1152,"open_issues_count":77,"forks_count":108,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-08-28T04:36:29.955Z","etag":null,"topics":["embedded-graphics","hacktoberfest","no-std"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/embedded-graphics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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,"zenodo":null},"funding":{"github":"jamwaffles","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-02-05T14:31:18.000Z","updated_at":"2025-08-27T21:02:57.000Z","dependencies_parsed_at":"2023-11-07T12:27:06.336Z","dependency_job_id":"9996b8d9-a2ad-45f3-880a-c9a5507f028f","html_url":"https://github.com/embedded-graphics/embedded-graphics","commit_stats":{"total_commits":553,"total_committers":40,"mean_commits":13.825,"dds":0.5605786618444846,"last_synced_commit":"04026eb0b4c151fbc17b715bf1dbd65944db8e9d"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/embedded-graphics/embedded-graphics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Fembedded-graphics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Fembedded-graphics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Fembedded-graphics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Fembedded-graphics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/embedded-graphics","download_url":"https://codeload.github.com/embedded-graphics/embedded-graphics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Fembedded-graphics/sbom","scorecard":{"id":20276,"data":{"date":"2025-08-11","repo":{"name":"github.com/embedded-graphics/embedded-graphics","commit":"db56cdf2df8a019f17b5b1d69c372eda61f61fb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Maintained","score":5,"reason":"4 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":7,"reason":"Found 22/30 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/embedded-graphics/ci.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T16:38:43.002Z","repository_id":37823710,"created_at":"2025-08-14T16:38:43.003Z","updated_at":"2025-08-14T16:38:43.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272734612,"owners_count":24984277,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["embedded-graphics","hacktoberfest","no-std"],"created_at":"2024-08-01T17:01:15.891Z","updated_at":"2025-08-29T18:04:09.085Z","avatar_url":"https://github.com/embedded-graphics.png","language":"Rust","funding_links":["https://github.com/sponsors/jamwaffles"],"categories":["Rust","GUI"],"sub_categories":["Logging"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"150\" src=\"https://raw.githubusercontent.com/embedded-graphics/embedded-graphics/191fe7f8a0fedc713f9722b9dc59208dacadee7e/assets/logo.svg?sanitize=true\" alt=\"Embedded graphics logo\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://circleci.com/gh/embedded-graphics/embedded-graphics/tree/master\"\u003e\u003cimg src=\"https://circleci.com/gh/embedded-graphics/embedded-graphics/tree/master.svg?style=shield\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/embedded-graphics\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/embedded-graphics.svg\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/embedded-graphics\"\u003e\u003cimg src=\"https://docs.rs/embedded-graphics/badge.svg\" alt=\"Docs.rs\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://matrix.to/#/#rust-embedded-graphics:matrix.org\"\u003e\u003cimg src=\"https://img.shields.io/matrix/rust-embedded-graphics:matrix.org\" alt=\"embedded-graphics on Matrix\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Embedded graphics\n\nEmbedded-graphics is a 2D graphics library that is focused on memory constrained embedded devices.\n\nA core goal of embedded-graphics is to draw graphics without using any buffers; the crate is\n`no_std` compatible and works without a dynamic memory allocator, and without pre-allocating\nlarge chunks of memory. To achieve this, it takes an `Iterator` based approach, where pixel\ncolors and positions are calculated on the fly, with the minimum of saved state. This allows the\nconsuming application to use far less RAM at little to no performance penalty.\n\nIt contains built in items that make it easy to draw 2D graphics primitives:\n\n* [Raw data images]\n* [Primitives]\n    * [Lines]\n    * [Rectangles (and squares)]\n    * [Circles]\n    * [Ellipses]\n    * [Arcs]\n    * [Sectors]\n    * [Triangles]\n    * [Polylines]\n    * [Rounded rectangles]\n* [Text]\n* [Monospaced fonts]\n\n## Additional functions provided by external crates\n\nEmbedded-graphics is designed to be extended by the application or other crates. Examples of\nthis are adding support for different image formats or implementing custom fonts.\n\n* [BMP images - `tinybmp`](https://crates.io/crates/tinybmp)\n* [TGA images - `tinytga`](https://crates.io/crates/tinytga)\n* [QOI images - `tinyqoi`](https://crates.io/crates/tinyqoi)\n* [Large collection of fonts - `u8g2-fonts`](https://crates.io/crates/u8g2-fonts)\n* [ProFont monospace font - `profont`](https://crates.io/crates/profont)\n* [Picofont Pico8 font - `embedded-picofont`](https://crates.io/crates/embedded_picofont)\n* [MogeeFont proportional font with kerning and ligatures - `embedded-mogeefont`](https://crates.io/crates/embedded_mogeefont)\n* [IBM437 font - `ibm437`](https://crates.io/crates/ibm437)\n* [The fonts shipped with `embedded-graphics` 0.6 - `embedded-vintage-fonts`](https://crates.io/crates/embedded-vintage-fonts)\n* [TTF and OTF font support - `embedded-ttf`](https://crates.io/crates/embedded-ttf)\n* [Simple layout/alignment functions - `embedded-layout`](https://crates.io/crates/embedded-layout)\n* [TextBox with text alignment options - `embedded-text`](https://crates.io/crates/embedded-text)\n* [Heapless plotting library for small embedded targets - `embedded-plots`](https://crates.io/crates/embedded-plots)\n* [Virtual seven-segment displays - `eg-seven-segment`](https://crates.io/crates/eg-seven-segment)\n* [Canvas for drawing onto before drawing on the display - `embedded-canvas`](https://crates.io/crates/embedded-canvas)\n* [Frames Per Second counter for embedded devices - `embedded-fps`](https://crates.io/crates/embedded-fps)\n* [Framebuffer with DMA support - `embedded-graphics-framebuf`](https://crates.io/crates/embedded-graphics-framebuf)\n* [Alpha compositing Canvas with a framebuffer - `embedded-rgba`](https://crates.io/crates/embedded-rgba)\n* [Use any font with embedded-graphics - antialiased bitmap font format - `minitype`](https://crates.io/crates/minitype)\n\nNote that some of these crates may not support the latest version of embedded-graphics.\n\nIf you know of a crate that is not in this list, please [open an\nissue](https://github.com/embedded-graphics/embedded-graphics/issues/new) to add it.\n\n## Display drivers\n\nTo support many different kinds of display, embedded-graphics doesn't include any drivers\ndirectly but provides the [`DrawTarget`] API in [`embedded-graphics-core`] that can be\nimplemented by external crates. In addition to the drivers for real displays, the\n[simulator](https://docs.rs/embedded-graphics-simulator/) can be used to test code during\ndevelopment.\n\n![Photographs showing embedded-graphics running on physical display hardware.](https://raw.githubusercontent.com/embedded-graphics/embedded-graphics/4c680418cc4c37b8f7ed92d8b26edfde880d4c96/assets/banner-photo.jpg)\n\nThese are just some of the displays the community has added embedded-graphics support to. This\nlist is taken from the [dependent crates\nlist](https://crates.io/crates/embedded-graphics/reverse_dependencies) on crates.io so might be\nmissing some unpublished entries. Please [open an\nissue](https://github.com/embedded-graphics/embedded-graphics/issues/new) if there's a display driver\nthat should be added to this list.\n\nNote that some drivers may not support the latest version of embedded-graphics.\n\n* [embedded-graphics-web-simulator](https://crates.io/crates/embedded-graphics-web-simulator): Simulated display in your browser via Webassembly\n* [epd-waveshare](https://crates.io/crates/epd-waveshare) Driver for various ePaper displays (EPD) from Waveshare\n* [hub75](https://crates.io/crates/hub75): A rust driver for hub75 rgb matrix displays\n* [ili9341](https://crates.io/crates/ili9341): A platform agnostic driver to interface with the ILI9341 (and ILI9340C) TFT LCD display\n* [ls010b7dh01](https://crates.io/crates/ls010b7dh01): A platform agnostic driver for the LS010B7DH01 memory LCD display\n* [push2_display](https://crates.io/crates/push2_display): Ableton Push2 embedded-graphics display driver\n* [retro-display](https://crates.io/crates/retro-display): Display drivers for retro-computers incl. Commodore 64\n* [sh1106](https://crates.io/crates/sh1106): I2C driver for the SH1106 OLED display\n* [sh1108](https://crates.io/crates/sh1108): I2C/SPI driver for the SH1108 OLED display\n* [smart-leds-matrix](https://github.com/smart-leds-rs/smart-leds-matrix): Driver for smart LED (like ws2812) based LED matrixes.\n* [ssd1306](https://crates.io/crates/ssd1306): I2C and SPI (4 wire) driver for the SSD1306 OLED display\n* [ssd1309](https://crates.io/crates/ssd1309): I2C/SPI driver for the SSD1309 OLED display written in 100% Rust.\n* [ssd1322](https://crates.io/crates/ssd1322): Pure Rust driver for the SSD1322 OLED display chip\n* [ssd1331](https://crates.io/crates/ssd1331): SPI (4 wire) driver for the SSD1331 OLED display\n* [ssd1351](https://crates.io/crates/ssd1351): SSD1351 driver\n* [ssd1675](https://crates.io/crates/ssd1675): Rust driver for the Solomon Systech SSD1675 e-Paper display (EPD) controller\n* [st7565](https://crates.io/crates/st7565): SPI driver for ST7565 based displays\n* [st7567_rs](https://crates.io/crates/st7567_rs): SPI driver for ST7567 displays\n* [st7567s](https://crates.io/crates/st7567s): Driver for the ST7567S LCD controller\n* [st7735-lcd](https://crates.io/crates/st7735-lcd): Rust library for displays using the ST7735 driver\n* [st7789](https://crates.io/crates/st7789): A Rust driver library for ST7789 displays\n* [st7920](https://crates.io/crates/st7920): ST7920 LCD driver in Rust\n* [gc9a01-rs](https://crates.io/crates/gc9a01-rs): SPI 4-wire driver for the Gc9a01 display driver\n\n## Simulator\n\nEmbedded graphics comes with a [simulator]! The simulator can be used to test and debug\nembedded graphics code, or produce examples and interactive demos to show off embedded graphics\nfeatures.\n\n![A screenshot of embedded-graphics running in its simulator.](https://raw.githubusercontent.com/embedded-graphics/embedded-graphics/4c680418cc4c37b8f7ed92d8b26edfde880d4c96/assets/simulator-demo.png)\n\nTake a look at the [examples repository](https://github.com/embedded-graphics/examples) to see what\nembedded-graphics can do, and how it might look on a display. You can run the examples like\nthis:\n\n```bash\ngit clone https://github.com/embedded-graphics/examples.git\ncd examples/eg-0.7\n\ncargo run --example hello-world\n```\n\n## Crate features\n\nAdditional features can be enabled by adding the following features to your `Cargo.toml`.\n\n* `nalgebra_support` - use the [Nalgebra](https://crates.io/crates/nalgebra) crate with `no_std`\n  support to enable conversions from `nalgebra::Vector2` to [`Point`] and [`Size`].\n\n* `fixed_point` - use fixed point arithmetic instead of floating point for all trigonometric\n  calculation.\n\n* `defmt` - provide implementations of `defmt::Format` for all types where possible. [`defmt`]\n  is a library for logging that moves as much work as possible over to a separate logging\n  machine, making it especially suited to low-resource MCUs. Note that `defmt` might not work with\n  older versions of rustc that are otherwise supported by embedded-graphics.\n\n## Migrating from older versions\n\n* [Migration guide from 0.5 to 0.6](https://github.com/embedded-graphics/embedded-graphics/blob/master/MIGRATING-0.5-0.6.md).\n* [Migration guide from 0.6 to 0.7](https://github.com/embedded-graphics/embedded-graphics/blob/master/MIGRATING-0.6-0.7.md).\n\n## Implementing `embedded_graphics` support for a display driver\n\nTo add support for embedded-graphics to a display driver, [`DrawTarget`] from\n[`embedded-graphics-core`] must be implemented. This allows all embedded-graphics items to be\nrendered by the display. See the [`DrawTarget`] documentation for implementation details.\n\n## Examples\n\n### Drawing examples\n\n[![A grid of screenshots showing primitives, text and other items that can be drawn using embedded-graphics.](https://raw.githubusercontent.com/embedded-graphics/embedded-graphics/4c680418cc4c37b8f7ed92d8b26edfde880d4c96/doc/assets/all_drawing_ops.png)][examples]\n\nExample usage of drawing primitives, text and images with embedded-graphics can be found [here][examples].\n\n### Shapes and text\n\nThe following example draws some shapes and text to a [`FrameBuffer`](crate::framebuffer::Framebuffer)\nin place of target hardware. The [simulator](https://docs.rs/embedded-graphics-simulator/) can also be used for\ndebugging, development or if hardware is not available.\n\n```rust\nuse embedded_graphics::{\n    framebuffer::{buffer_size, Framebuffer},\n    mono_font::{ascii::FONT_6X10, MonoTextStyle},\n    pixelcolor::{raw::LittleEndianMsb0, BinaryColor},\n    prelude::*,\n    primitives::{\n        Circle, PrimitiveStyle, PrimitiveStyleBuilder, Rectangle, StrokeAlignment, Triangle,\n    },\n    text::{Alignment, Text},\n    mock_display::MockDisplay,\n};\n\nfn main() -\u003e Result\u003c(), std::convert::Infallible\u003e {\n    // Create a new framebuffer\n    let mut display = Framebuffer::\u003c\n       BinaryColor,\n       _,\n       LittleEndianMsb0,\n       320,\n       240,\n       { buffer_size::\u003cBinaryColor\u003e(320, 240) },\n  \u003e::new();\n\n    // Create styles used by the drawing operations.\n    let thin_stroke = PrimitiveStyle::with_stroke(BinaryColor::On, 1);\n    let thick_stroke = PrimitiveStyle::with_stroke(BinaryColor::On, 3);\n    let border_stroke = PrimitiveStyleBuilder::new()\n        .stroke_color(BinaryColor::On)\n        .stroke_width(3)\n        .stroke_alignment(StrokeAlignment::Inside)\n        .build();\n    let fill = PrimitiveStyle::with_fill(BinaryColor::On);\n    let character_style = MonoTextStyle::new(\u0026FONT_6X10, BinaryColor::On);\n\n    let yoffset = 10;\n\n    // Draw a 3px wide outline around the display.\n    display\n        .bounding_box()\n        .into_styled(border_stroke)\n        .draw(\u0026mut display)?;\n\n    // Draw a triangle.\n    Triangle::new(\n        Point::new(16, 16 + yoffset),\n        Point::new(16 + 16, 16 + yoffset),\n        Point::new(16 + 8, yoffset),\n    )\n    .into_styled(thin_stroke)\n    .draw(\u0026mut display)?;\n\n    // Draw a filled square\n    Rectangle::new(Point::new(52, yoffset), Size::new(16, 16))\n        .into_styled(fill)\n        .draw(\u0026mut display)?;\n\n    // Draw a circle with a 3px wide stroke.\n    Circle::new(Point::new(88, yoffset), 17)\n        .into_styled(thick_stroke)\n        .draw(\u0026mut display)?;\n\n    // Draw centered text.\n    let text = \"embedded-graphics\";\n    Text::with_alignment(\n        text,\n        display.bounding_box().center() + Point::new(0, 15),\n        character_style,\n        Alignment::Center,\n    )\n    .draw(\u0026mut display)?;\n\n    Ok(())\n}\n```\n\nThis example is also included in the [examples](https://github.com/embedded-graphics/examples) repository and\ncan be run using `cargo run --example hello-world`. It produces this output:\n\n![Embedded Graphics Simulator example screenshot](https://raw.githubusercontent.com/embedded-graphics/embedded-graphics/4c680418cc4c37b8f7ed92d8b26edfde880d4c96/assets/hello-world-simulator.png)\n\nAdditional examples can be found in the [examples](https://github.com/embedded-graphics/examples) repository.\n\n[`Circle`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/circle/struct.Circle.html\n[`MockDisplay`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/mock_display/struct.MockDisplay.html\n[`Point`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/geometry/struct.Point.html\n[`Size`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/geometry/struct.Size.html\n[Raw data images]: https://docs.rs/embedded-graphics/latest/embedded_graphics/image/struct.ImageRaw.html\n[Primitives]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/index.html\n[Lines]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/line/struct.Line.html\n[Rectangles (and squares)]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/rectangle/struct.Rectangle.html\n[Circles]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/circle/struct.Circle.html\n[Ellipses]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/ellipse/struct.Ellipse.html\n[Arcs]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/arc/struct.Arc.html\n[Sectors]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/sector/struct.Sector.html\n[Triangles]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/triangle/struct.Triangle.html\n[Polylines]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/polyline/struct.Polyline.html\n[Rounded rectangles]: https://docs.rs/embedded-graphics/latest/embedded_graphics/primitives/rounded_rectangle/struct.RoundedRectangle.html\n[Text]: https://docs.rs/embedded-graphics/latest/embedded_graphics/text/index.html\n[Monospaced fonts]: https://docs.rs/embedded-graphics/latest/embedded_graphics/mono_font/index.html\n[examples]: https://docs.rs/embedded-graphics/latest/embedded_graphics/examples/index.html\n\n[`DrawTarget`]: https://docs.rs/embedded-graphics-core/latest/embedded_graphics_core/draw_target/trait.DrawTarget.html\n[`embedded-graphics-core`]: https://docs.rs/embedded-graphics-core/\n[simulator]: https://github.com/embedded-graphics/simulator\n[simulator examples]: https://github.com/embedded-graphics/simulator/tree/master/examples\n[`defmt`]: https://defmt.ferrous-systems.com/\n\n## Minimum supported Rust version\n\nThe minimum supported Rust version for embedded-graphics is `1.81` or greater.\nEnsure you have the correct version of Rust installed, preferably through \u003chttps://rustup.rs\u003e.\n\n## Development setup\n\nPlease see the [development setup guide](https://github.com/embedded-graphics/embedded-graphics/blob/master/doc/development-setup.md).\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the\nwork by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembedded-graphics%2Fembedded-graphics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembedded-graphics%2Fembedded-graphics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembedded-graphics%2Fembedded-graphics/lists"}