Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v0.8-pre' into Use-palette-for-c…
Browse files Browse the repository at this point in the history
…olors
  • Loading branch information
OlivierLemoine committed Feb 19, 2025
2 parents 3a432bf + 44aa95b commit 94a38c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions dessin-pdf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ use dessin::{
prelude::*,
};
use nalgebra::Translation2;
//------------------------------------------------
use printpdf::path::WindingOrder;
use printpdf::{
color, path::PaintMode, BuiltinFont, IndirectFontRef, Line, Mm, PdfDocument,
PdfDocumentReference, PdfLayerReference, Point,
};
use std::{collections::HashMap, fmt};
//------------------------------------------------

#[derive(Debug)]
pub enum PDFError {
Expand Down
7 changes: 6 additions & 1 deletion dessin/src/contrib/padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ use nalgebra::{Rotation2, Scale2, Transform2, Translation2, Vector2};
use std::ops::{Deref, DerefMut};

#[derive(Debug, Clone, PartialEq, Shape)]
/// Add padding around a `Shape`
pub struct Padding<T> {
#[shape(into)]
/// Wrapped `Shape`
#[shape(into)]
pub shape: T,

/// Left padding
pub padding_left: f32,
/// Right padding
pub padding_right: f32,
/// Top padding
pub padding_top: f32,
/// Bottom padding
pub padding_bottom: f32,
}
impl<T> Default for Padding<T>
Expand Down

0 comments on commit 94a38c1

Please sign in to comment.