-
Notifications
You must be signed in to change notification settings - Fork 5
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
rework bitmap image rendering simulation #63
rework bitmap image rendering simulation #63
Conversation
…ork-bitmap-image-rendering-simulation
…ractErikaMock; fix tests
…ap-image-rendering-simulation Conflicts: erika/erika_mock.py
do not throw in finally block if erika init fails
@@ -39,6 +39,8 @@ set -x | |||
|
|||
./erika.sh render_ascii_art -h | |||
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt | |||
# FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be done in #64
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY, | ||
exception_if_overprinted=False) | ||
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY) | ||
else: | ||
# a bit hacky, as I'm mirroring behavior from ErikaImageRenderer - this kindof goes against the now-beautiful architecture :( | ||
try: | ||
# hacky: use exception to determine image type | ||
image_for_provoking_exception = WrappedImage(args.file) | ||
erika = MicrostepBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, output_after_each_step=True, | ||
delay_after_each_step=DRY_RUN_DELAY, exception_if_overprinted=False) | ||
erika = MicrostepBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY) | ||
except NotAnImageException: | ||
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY, | ||
exception_if_overprinted=False) | ||
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sane defaults would be nice here, so that parameter-less ctor.
Limiting the hight might not make much sense, because we use endless paper with hardware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed:
To be done in #69
…ure/rework-bitmap-image-rendering-simulation rework bitmap image rendering simulation
Implements issue #60
MUST BE DONE AFTER #52 !