kopia lustrzana https://github.com/inkstitch/inkstitch
				
				
				
			remove previously added extra space from svg tartan dimensions
							rodzic
							
								
									37bf83d8db
								
							
						
					
					
						commit
						1b5b58736d
					
				|  | @ -24,7 +24,7 @@ from ..stitches.auto_fill import (PathEdge, build_fill_stitch_graph, | |||
| from ..svg import PIXELS_PER_MM, get_correction_transform | ||||
| from ..utils import DotDict, ensure_multi_line_string | ||||
| from .palette import Palette | ||||
| from .utils import sort_fills_and_strokes, stripes_to_shapes, get_palette_width | ||||
| from .utils import sort_fills_and_strokes, stripes_to_shapes | ||||
| 
 | ||||
| 
 | ||||
| class TartanSvgGroup: | ||||
|  | @ -51,8 +51,6 @@ class TartanSvgGroup: | |||
|         self.symmetry = self.palette.symmetry | ||||
|         self.stripes = self.palette.palette_stripes | ||||
|         self.warp, self.weft = self.stripes | ||||
|         self.warp_width = get_palette_width(settings) | ||||
|         self.weft_width = get_palette_width(settings) | ||||
|         if self.palette.get_palette_width(self.scale, self.min_stripe_width) == 0: | ||||
|             self.warp = [] | ||||
|         if self.palette.get_palette_width(self.scale, self.min_stripe_width, 1) == 0: | ||||
|  | @ -517,12 +515,6 @@ class TartanSvgGroup: | |||
|             maxx = center.x + min_radius | ||||
|             maxy = center.y + min_radius | ||||
| 
 | ||||
|         extra_space = max(self.warp_width * PIXELS_PER_MM, self.weft_width * PIXELS_PER_MM) | ||||
|         minx -= extra_space | ||||
|         maxx += extra_space | ||||
|         miny -= extra_space | ||||
|         maxy += extra_space | ||||
| 
 | ||||
|         return (float(minx), float(miny), float(maxx), float(maxy)), center | ||||
| 
 | ||||
|     def _polygon_to_path( | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Kaalleen
						Kaalleen