Skip to content

Commit

Permalink
release v1.3.0b0
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Mar 24, 2024
1 parent 271ce0e commit c91a14d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ezdxf/addons/drawing/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def set_config(self, config: Configuration) -> None:
self.solid_lines_only = config.line_policy == LinePolicy.SOLID

def pattern(self, properties: Properties) -> Sequence[float]:
"""Get pattern - implements pattern caching."""
"""Returns simplified linetype tuple: on-off sequence"""
if self.solid_lines_only:
scale = 0.0
else:
Expand All @@ -577,12 +577,11 @@ def pattern(self, properties: Properties) -> Sequence[float]:
key: PatternKey = (properties.linetype_name, scale)
pattern_ = self.pattern_cache.get(key)
if pattern_ is None:
pattern_ = self.create_pattern(properties, scale)
pattern_ = self._create_pattern(properties, scale)
self.pattern_cache[key] = pattern_
return pattern_

def create_pattern(self, properties: Properties, scale: float) -> Sequence[float]:
"""Returns simplified linetype tuple: on-off sequence"""
def _create_pattern(self, properties: Properties, scale: float) -> Sequence[float]:
if len(properties.linetype_pattern) < 2:
# Do not return None -> None indicates: "not cached"
return tuple()
Expand Down

0 comments on commit c91a14d

Please sign in to comment.