Skip to content

Commit

Permalink
Update macro (use * instead of ! for style) and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLemoine committed Feb 18, 2025
1 parent ee275ce commit 3d8d832
Show file tree
Hide file tree
Showing 54 changed files with 5,973 additions and 5,901 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
Cargo.lock
.DS_Store
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Try out the new [API](https://github.com/432-Technologies/dessin/tree/v0.8-pre)**

Generate complex drawing for PDF, SVG, and many more to come !
Generate complex drawing for PDF, SVG, and many more to come !

## Getting started

Expand Down Expand Up @@ -37,7 +37,7 @@ impl MyShape {
}
impl From<MyShape> for Shape {
fn from(MyShape { text }: MyShape) -> Self {
dessin2!(Text!(fill = Srgb::<f32>::from_format(named::RED).into_linear(), { text })).into()
dessin2!(*Text(fill = Srgb::<f32>::from_format(named::RED).into_linear(), { text })).into()
}
}

Expand All @@ -46,12 +46,12 @@ fn main() {
let radius = x as f32 * 10.;

dessin2!([
Circle!(
*Circle(
fill = Srgb::<f32>::from_format(named::RED).into_linear(),
{ radius },
translate = [x as f32 * 5., 10.],
),
Text!(fill = Srgb::<f32>::from_format(named::BLACK).into_linear(), font_size = 10., text = "Hi !",),
*Text(fill = Srgb::<f32>::from_format(named::BLACK).into_linear(), font_size = 10., text = "Hi !",),
])
});

Expand Down
Loading

0 comments on commit 3d8d832

Please sign in to comment.