New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Image.blank() #60

Merged
merged 1 commit into from Sep 19, 2012

Conversation

2 participants
@pflorczyk
Contributor

pflorczyk commented Sep 18, 2012

This change is backward incompatible. It removes width, height and background from Image.__init__() in favour of new method Image.blank().

Example:

i = Image().blank(100, 100)

Not a big change but now code should be more readable and less error-prone.

@pflorczyk

View changes

wandtests/image.py Outdated
@@ -46,12 +46,12 @@ def blank_image():
gray = Color('#ccc')
transparent = Color('transparent')
with raises(TypeError):
Image(height=0, filename='/test.png')
Image().blank(height=0, filename='/test.png')

This comment has been minimized.

@pflorczyk

pflorczyk Sep 18, 2012

Contributor

What to do with this ? This test passes, but filename is not an argument for blank. height=0 is tested line bellow.

This comment has been minimized.

@dahlia
@dahlia

This comment has been minimized.

Collaborator

dahlia commented Sep 18, 2012

I agree with this your refactoring except backward incompatible change. The constructor should have parameters for creating a new blank image, even though it internally calls Image.blank() method.

@pflorczyk

This comment has been minimized.

Contributor

pflorczyk commented Sep 19, 2012

Ok. Updated the commit.

dahlia added a commit that referenced this pull request Sep 19, 2012

Merge pull request #60 from pflorczyk/master
Added Image.blank()

@dahlia dahlia merged commit 4047076 into emcconville:master Sep 19, 2012

1 check passed

default The Travis build passed
Details
@dahlia

This comment has been minimized.

Collaborator

dahlia commented Sep 19, 2012

Thanks! I merged it.

dahlia added a commit that referenced this pull request Sep 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment