Skip to main content

A Tkinter DrawArea wrapper class for the pycairo package.

Project description

A Tkinter DrawArea wrapper class for the pycairo package.

This package provides an alternative to the Tkinter Canvas widget for rendering and displaying graphics objects. The DrawArea widget is a high-level wrapper class for the pycairo package, which implements many of that package's graphics and text rendering capabilities. One of these is the ability to generate sub-pixel graphics resolution by using the anti-aliasing capabilities. Another is the ability to render text and graphics using full 32-bit, RGBA colors.

An important difference from either the Tkinter Canvas widget or the pycairo package, is that the DrawArea widget class was defined to operate in a standard, right-handed coordinate system. This means that the y-axis coordinate value increases from the bottom of the display to the top of the display.

In addition to the DrawArea widget, this package also includes a fully defined Vector class. This class represents a geometric vector in the xy plane, and it is an extremely useful and powerful tool for creating and manipulating graphic objects. In fact, the DrawArea widget was implemented using the Vector class.

In summary, this package adds a fully compatible DrawArea widget to Tkinter's set of graphical user interface widgets, thereby providing the user with a convenient tool for working with the pycairo package in any Tkinter window based application.

Overview

This package provides the following class definitions :

  • DrawArea - A Tkinter widget class for rendering and displaying graphics
  • BorderStyle - A data class of the available border style options
  • Brush - A data class of graphics rendering options
  • Font - A data class for describing a text font
  • TextStyle - A data class of text rendering options
  • Shape - An enumerated class of available datapoint shapes
  • LineCap - An enumerated class of available line endpoint options
  • LineJoin - An enumerated class of available line junction options
  • Antialias - An enumerated class of available rendering options
  • Size - A named tuple class of the width and height dimensions of an object
  • Vector - A class which represents a geometric vector in the xy plane

The DrawArea widget class provides the rectangular area where the graphics and text objects are rendered and displayed on the screen.

The Antialias and BorderStyle classes are used to specify the configuration and display options for the DrawArea widget class.

The Brush and Shape classes are used to specify the rendering options for the various DrawArea graphics rendering methods.

The LineCap and LineJoin classes are used to specify the line rendering options for the Brush class.

The Font and TextStyle classes are used to specify the rendering options for the DrawArea text rendering method.

The Size and Vector classes not are required for using the DrawArea rendering methods, but are provided as "helper" classes for the user. The Size class is a useful way to specify the dimensions of a graphics object, and the Vector class is a very useful tool for specifying and manipulating the location coordinates of graphic objects.

Documentation

Full documentation for all the classes contained in this package, as well as usage examples, are available at the package's GitHub repository: https://github.com/johnbolk/pycairotk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycairotk-1.4.7.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycairotk-1.4.7-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pycairotk-1.4.7.tar.gz.

File metadata

  • Download URL: pycairotk-1.4.7.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for pycairotk-1.4.7.tar.gz
Algorithm Hash digest
SHA256 b299c8275c2068dac758f4537672455c30ccc2480763ba41132407149873dddb
MD5 fefef05b757259edbcaf8fe3e35bc41f
BLAKE2b-256 5dc8ebe9ec01a75043c639228ac29b446bca8676d8bfca3da8d1e4aab7c75b24

See more details on using hashes here.

File details

Details for the file pycairotk-1.4.7-py3-none-any.whl.

File metadata

  • Download URL: pycairotk-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for pycairotk-1.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0e93603f3acaf9369f9dd92fce76e4c39ce456e2288aab92fd897b762b0cfb9c
MD5 2d06704a5d8254d5b8ad98392b89e019
BLAKE2b-256 c0e58295f4c6c21a4d88a9da4dfbe1d6c817f8de51096f742c93f838af9b48c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page