Skip to content

Commit

Permalink
New Image.stretch to make images right dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
marinho committed Feb 4, 2013
1 parent 8f3a680 commit 732abbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions geraldo/generators/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def generate_graphic(self, graphic, canvas=None):
graphic.top,
graphic.width,
graphic.height,
preserveAspectRatio=not graphic.stretch,
)
elif isinstance(graphic, BarCode):
barcode = graphic.render()
Expand Down
1 change: 1 addition & 0 deletions geraldo/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class Image(Graphic):
filename = None
_image = None # PIL image object is stored here
get_image = None # To be overrided
stretch = False

_repr_for_cache_attrs = ('left','top','height','width','visible','stroke',
'stroke_color','stroke_width','fill','fill_color','filename')
Expand Down
2 changes: 1 addition & 1 deletion geraldo/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (0, 4, 16)
VERSION = (0, 4, 17)

def get_version():
return '%d.%d.%d'%VERSION
Expand Down

0 comments on commit 732abbf

Please sign in to comment.