question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cant get screen.paint() to render something

See original GitHub issue

Hi,

according to the docs http://asciimatics.readthedocs.io/en/stable/rendering.html#rendering I should be able to render a figlet using

Pre-render ASCIIMATICS using the big Figlet font

renderer = FigletText("ASCIIMATICS", font='big')

and then calling “paint”

like

screen.paint(renderer, 0, 0)

this however does not work, I can not find this in the docs so I can only use a Scene to render a figlettext?

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbrittaincommented, Jun 18, 2017

I’m assuming that this has fixed your problem. Now closing.

0reactions
peterbrittaincommented, Jun 14, 2017

Ok - I see the issue now. You can’t just pass the renderer straight in to paint. You need something like this.

        image, colours = self._renderer.rendered_text
        for (i, line) in enumerate(image):
            self._screen.paint(line, self._x, self._y + i, self._colour,
                               attr=self._attr,
                               bg=self._bg,
                               transparent=self._transparent,
                               colour_map=colours[i])

This is taken from the Print class, so you’ll need to fix up the use of object member variables.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Print Screen Fails When Pasting into Paint - Microsoft Support
Method 2. Open Paint. On the Options menu, click Draw Opaque. Paste in the image.
Read more >
Java clears screen when calling paint method - how to avoid ...
I'm trying to draw two lines in a Canvas in Java, calling two methods separately, but when I draw the second line, the...
Read more >
Fixed: Print Screen Not Working on Windows 10 | SoftwareKeep
Here are 6 solutions on how to fix print screen not working in Windows 10. Click here to get started.
Read more >
First Screen Paint In Advance - W3C
Blindly make the first screen content painted in advance will cause painting disorder and performance regression. Web developers can indicate ...
Read more >
9 tricks to eliminate render blocking resources - LogRocket Blog
Use the defer and async attributes to eliminate render-blocking JavaScript; Find and remove unused CSS and JavaScript; Split code into smaller ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found