Skip to content
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

Add fill kwarg to the Mask constructor #806

merged 3 commits into from Feb 12, 2019


None yet
3 participants
Copy link

charlesej commented Feb 8, 2019

This update adds a fill keyword parameter to the Mask constructor.

Overview of changes:

  • Added the fill keyword parameter to the Mask constructor. The default value is False to maintain backward compatibility.
  • Changed the Mask constructor to raise a PyExc_MemoryError if bitmask_create() fails to return a valid mask object.
  • Updated the pygame.mask documentation.
  • Added test methods to test Mask constructor parameters.

System details:

  • os: windows 10 (64bit)
  • python: 3.7.2 (64bit) and 2.7.10 (64bit)
  • pygame: 1.9.5.dev0 (SDL: 1.2.15) at 5de404e

Resolves the "Add an argument to the Mask() constructor..." item of #800.

Show resolved Hide resolved src_c/mask.c Outdated

@charlesej charlesej force-pushed the charlesej:add-mask-fill-kwarg branch from c8d12db to fa2abd2 Feb 9, 2019

Show resolved Hide resolved docs/reST/ref/mask.rst Outdated
Show resolved Hide resolved docs/reST/ref/mask.rst Outdated
Update Mask() documentation
Changes based on PR comments.
- Show the signatures for Mask() as separate options
- Use proper type syntax for size parameter

@illume illume merged commit e147ebd into pygame:master Feb 12, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@charlesej charlesej deleted the charlesej:add-mask-fill-kwarg branch Feb 12, 2019

@dlon dlon referenced this pull request Mar 23, 2019


1.9.5 release notes. #561

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.