Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple SVG image creator.

NotificationsYou must be signed in to change notification settings

COMP6991UNSW/unsvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unsvg is a Rust crate that provides a very simple SVG (Scalable VectorGraphics) rendering library. It is built upon the solid foundation of theresvg crate and offers developers aneasy to use system for generating simple images.

Unsvg was developed for COMP6991: Solving Modern Programming Problems with Rust,a course at the University of New South Wales.

Usage

To useunsvg in your Rust project, simply add it as a dependency in yourCargo.toml:

[dependencies]unsvg ="0.1"

Then, import it into your code:

use unsvg::{Image,COLORS};fnmain() ->Result<(),String>{letmut img:Image =Image::new(200,200);let second_point = img.draw_simple_line(10.0,10.0,120,100.0,COLORS[1])?;let third_point = img.draw_simple_line(second_point.0, second_point.1,240,100.0,COLORS[2])?;let _ = img.draw_simple_line(third_point.0, third_point.1,0,100.0,COLORS[3])?;    img.save_svg("path_to.svg")?;Ok(())}

For detailed usage instructions and examples, please refer to the documentation.

Documentation

Explore the full capabilities ofunsvg by visiting ourdocumentation. You'll find comprehensiveguides, API references, and example code to help you get started quickly.

Contributions

We welcome contributions from the open-source community. If you find issues,have feature requests, or want to contribute code, please visit our GitHubrepositoryhere and get involved.

License

unsvg is Copyright © University of New South Wales, licensed under MIT or Apache 2.0at your option.

About

A simple SVG image creator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp