Coder Social home page Coder Social logo

plotters-canvas's Introduction

plotters-canvas - The HTML5 canvas backend for Plotters

This is a part of plotters project. For more details, please check the following links:

Testing

This crate needs to be tested in a browser environment. In order to test, you should install wasm-pack first.

cargo install wasm-pack

To run the test case with wasm-pack. You need choose what browser you want to run the test cases. You should also be able to use --chrome or --safari as well.

wasm-pack test --firefox  

Also you should be able to run it headlessly by adding the headless param to the testing command.

wasm-pack test --firefox --headless

plotters-canvas's People

Contributors

38 avatar aaronerhardt avatar adrienchampion avatar ae1020 avatar dependabot-preview[bot] avatar facorread avatar nuald avatar redforks avatar serzhiio avatar tatrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plotters-canvas's Issues

non-exhaustive patterns: `RotateAngle(_)` not covered

Compilation fails against the git-master version of plotters-backend. plotters-rs/plotters-backend#2 introduced arbitrary angles for FontTransform, but plotters-cairo has not caught on because its CI is configured to build against the stable version of plotters-backend.

This issue was discovered while working on the plotters-rs/plotters#373 proposal.

plotters-cairo pr-ci-master* $ cd ../plotters-canvas && cargo build
   Compiling plotters-backend v0.3.1 (D:\plotters-backend)
   Compiling wasm-bindgen v0.2.81
   Compiling js-sys v0.3.58
   Compiling web-sys v0.3.58
   Compiling plotters-canvas v0.3.0 (D:\plotters-canvas)
error[E0004]: non-exhaustive patterns: `RotateAngle(_)` not covered
   --> src\canvas.rs:250:28
    |
250 |         let degree = match style.transform() {
    |                            ^^^^^^^^^^^^^^^^^ pattern `RotateAngle(_)` not covered
    |
note: `FontTransform` defined here
   --> D:\plotters-backend\src\text.rs:139:5
    |
129 | / pub enum FontTransform {
130 | |     /// Nothing to transform
131 | |     None,
132 | |     /// Rotating the text 90 degree clockwise
...   |
139 | |     RotateAngle(f32),
    | |     ^^^^^^^^^^^ not covered
140 | | }
    | |_-
    = note: the matched value is of type `FontTransform`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
254 ~             FontTransform::Rotate270 => 270.0,
255 ~             RotateAngle(_) => todo!(),
    |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `plotters-canvas` due to previous error
warning: build failed, waiting for other jobs to finish...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.