File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,16 @@ impl Stroke {
371
371
self . weight
372
372
}
373
373
374
+ /// Get the effective stroke weight.
375
+ pub fn effective_width ( & self ) -> f64 {
376
+ self . weight
377
+ * match self . align {
378
+ StrokeAlign :: Center => 1. ,
379
+ StrokeAlign :: Inside => 0. ,
380
+ StrokeAlign :: Outside => 2. ,
381
+ }
382
+ }
383
+
374
384
pub fn dash_lengths ( & self ) -> String {
375
385
if self . dash_lengths . is_empty ( ) {
376
386
"none" . to_string ( )
Original file line number Diff line number Diff line change @@ -988,7 +988,7 @@ impl Render for Table<Vector> {
988
988
let vector = row. element ;
989
989
990
990
if let Some ( element_id) = element_id {
991
- let stroke_width = vector. style . stroke ( ) . as_ref ( ) . map_or ( 0. , Stroke :: weight ) ;
991
+ let stroke_width = vector. style . stroke ( ) . as_ref ( ) . map_or ( 0. , Stroke :: effective_width ) ;
992
992
let filled = vector. style . fill ( ) != & Fill :: None ;
993
993
let fill = |mut subpath : Subpath < _ > | {
994
994
if filled {
You can’t perform that action at this time.
0 commit comments