Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73231

Re: Lines on a tkinter.Canvas

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Lines on a tkinter.Canvas
Date 2014-06-12 13:44 -0400
References <mailman.11027.1402548495.18130.python-list@python.org> <bvthovFg8ldU1@mid.individual.net>
Newsgroups comp.lang.python
Message-ID <mailman.11038.1402595064.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 6/12/2014 7:38 AM, Gregory Ewing wrote:
> Pedro Izecksohn wrote:
>> The Canvas' method create_line turns on at least 2 pixels. But I want
>> to turn
>> on many single pixels on a Canvas.
>
> You could try using a 1x1 rectangle instead.
>
> However, be aware that either of these will use quite a
> lot of memory per pixel. If you are drawing a very large
> number of pixels, this could cause performance problems.

Pedro, the tkinter canvas is a vector graphics canvas, not a bitmap 
image canvas as in paint programs.

> In that case, you might want to use a different approach,
> such as creating an image and telling the canvas to display
> the image.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Lines on a tkinter.Canvas Pedro Izecksohn <izecksohn@yahoo.com> - 2014-06-11 18:57 -0700
  Re: Lines on a tkinter.Canvas Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-06-12 23:38 +1200
    Re: Lines on a tkinter.Canvas Terry Reedy <tjreedy@udel.edu> - 2014-06-12 13:44 -0400
    Re: Lines on a tkinter.Canvas Pedro Izecksohn <izecksohn@yahoo.com> - 2014-06-12 13:33 -0700
    Re: Lines on a tkinter.Canvas Pedro Izecksohn <izecksohn@yahoo.com> - 2014-06-12 16:11 -0700
      Re: Lines on a tkinter.Canvas Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-06-13 12:31 +1200

csiph-web