Categories
Ebooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Computer in the office
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Multimedia trainings
- Real estate
- Persuasion and NLP
- Taxes
- Social policy
- Guides
- Presentations
- Leadership
- Public Relation
- Reports, analyses
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
E-press
- Architektura i wnętrza
- Biznes i Ekonomia
- Home and garden
- E-business
- Finances
- Personal finance
- Business
- Photography
- Computer science
- HR & Payroll
- Computers, Excel
- Accounts
- Culture and literature
- Scientific and academic
- Environmental protection
- Opinion-forming
- Education
- Taxes
- Travelling
- Psychology
- Religion
- Agriculture
- Book and press market
- Transport and Spedition
- Healthand beauty
-
History
-
Computer science
- Office applications
- Data bases
- Bioinformatics
- IT business
- CAD/CAM
- Digital Lifestyle
- DTP
- Electronics
- Digital photography
- Computer graphics
- Games
- Hacking
- Hardware
- IT w ekonomii
- Scientific software package
- School textbooks
- Computer basics
- Programming
- Mobile programming
- Internet servers
- Computer networks
- Start-up
- Operational systems
- Artificial intelligence
- Technology for children
- Webmastering
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Narrative poetry
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
School textbooks
-
Popular science and academic
- Archeology
- Bibliotekoznawstwo
- Cinema studies
- Philology
- Polish philology
- Philosophy
- Finanse i bankowość
- Geography
- Economy
- Trade. World economy
- History and archeology
- History of art and architecture
- Cultural studies
- Linguistics
- Literary studies
- Logistics
- Maths
- Medicine
- Humanities
- Pedagogy
- Educational aids
- Popular science
- Other
- Psychology
- Sociology
- Theatre studies
- Theology
- Economic theories and teachings
- Transport i spedycja
- Physical education
- Zarządzanie i marketing
-
Guides
-
Game guides
-
Professional and specialist guides
-
Law
- Health and Safety
- History
- Road Code. Driving license
- Law studies
- Healthcare
- General. Compendium of knowledge
- Academic textbooks
- Other
- Construction and local law
- Civil law
- Financial law
- Economic law
- Economic and trade law
- Criminal law
- Criminal law. Criminal offenses. Criminology
- International law
- International law
- Health care law
- Educational law
- Tax law
- Labor and social security law
- Public, constitutional and administrative law
- Family and Guardianship Code
- agricultural law
- Social law, labour law
- European Union law
- Industry
- Agricultural and environmental
- Dictionaries and encyclopedia
- Public procurement
- Management
-
Tourist guides and travel
- Africa
- Albums
- Southern America
- North and Central America
- Australia, New Zealand, Oceania
- Austria
- Asia
- Balkans
- Middle East
- Bulgary
- China
- Croatia
- The Czech Republic
- Denmark
- Egipt
- Estonia
- Europe
- France
- Mountains
- Greece
- Spain
- Holand
- Iceland
- Lithuania
- Latvia
- Mapy, Plany miast, Atlasy
- Mini travel guides
- Germany
- Norway
- Active travelling
- Poland
- Portugal
- Other
- Russia
- Romania
- Slovakia
- Slovenia
- Switzerland
- Sweden
- World
- Turkey
- Ukraine
- Hungary
- Great Britain
- Italy
-
Psychology
- Philosophy of life
- Kompetencje psychospołeczne
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Audiobooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Real estate
- Persuasion and NLP
- Taxes
- Guides
- Presentations
- Leadership
- Public Relation
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
History
-
Computer science
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
Popular science and academic
-
Guides
-
Professional and specialist guides
-
Law
-
Tourist guides and travel
-
Psychology
- Philosophy of life
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Videocourses
-
Data bases
-
Big Data
-
Biznes, ekonomia i marketing
-
Cybersecurity
-
Data Science
-
DevOps
-
For children
-
Electronics
-
Graphics/Video/CAX
-
Games
-
Microsoft Office
-
Development tools
-
Programming
-
Personal growth
-
Computer networks
-
Operational systems
-
Software testing
-
Mobile devices
-
UX/UI
-
Web development
-
Management
Podcasts
E-book details
Log in, If you're interested in the contents of the item.
Python 2.6 Graphics Cookbook. Learn how to use Python’s built-in graphics capabilities to create static and animated graphics for a range of real-world purposes. Over 100 recipes take you from basic shape creation to developing interactive GUIs
Mike Ohlson de Fine, Michael J Ohlson
Ebook
Python is a great object-oriented and interactive programming language that lets you develop graphics, both static and animated, using built-in vector graphics functions that are provided with Python.
Python 2.6 Graphics Cookbook is a collection of straightforward recipes and illustrative screenshots for creating and animating graphic objects using the Python language. This book makes the process of developing graphics interesting and entertaining by working in a graphic workspace without the burden of mastering complicated language definitions and opaque examples.
If you choose to work through all the recipes from the beginning, you will learn to install Python and create basic programs for making lines and shapes using the built-in Tkinter module. The confusing topic of color manipulation is explored in detail using existing Python tools as well as some new tools in the recipes. Next you will learn to manipulate font size, color, and placement of text as placing text exactly where you want on a screen can be tricky because font height, inter-character spacing, and text window dimensions all interfere with each other. Then you will learn how to animate graphics, for example having more than one independent graphic object co-exist and interact using various Python methods.
You will also learn how you can work with raster images, such as converting their formats using the Python Imaging Library. Next you will learn how you can combine vector images with raster images so that you can animate the raster images with ease. You will also walk through a set of recipes with the help of which you can handle and manipulate blocks of raw data that may be hundreds of megabytes in size using datastreams, files, and hard drives. You will also learn how you can use Inkscape to dismantle existing images and use parts of them for your own graphics and Python programs. At the end of the book you will learn how you can create GUIs for different purposes.
Python 2.6 Graphics Cookbook is a collection of straightforward recipes and illustrative screenshots for creating and animating graphic objects using the Python language. This book makes the process of developing graphics interesting and entertaining by working in a graphic workspace without the burden of mastering complicated language definitions and opaque examples.
If you choose to work through all the recipes from the beginning, you will learn to install Python and create basic programs for making lines and shapes using the built-in Tkinter module. The confusing topic of color manipulation is explored in detail using existing Python tools as well as some new tools in the recipes. Next you will learn to manipulate font size, color, and placement of text as placing text exactly where you want on a screen can be tricky because font height, inter-character spacing, and text window dimensions all interfere with each other. Then you will learn how to animate graphics, for example having more than one independent graphic object co-exist and interact using various Python methods.
You will also learn how you can work with raster images, such as converting their formats using the Python Imaging Library. Next you will learn how you can combine vector images with raster images so that you can animate the raster images with ease. You will also walk through a set of recipes with the help of which you can handle and manipulate blocks of raw data that may be hundreds of megabytes in size using datastreams, files, and hard drives. You will also learn how you can use Inkscape to dismantle existing images and use parts of them for your own graphics and Python programs. At the end of the book you will learn how you can create GUIs for different purposes.
- Python 2.6 Graphics Cookbook
- Table of Contents
- Python 2.6 Graphics Cookbook
- Credits
- About the Author
- About the Reviewers
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Errata
- Piracy
- Questions
- 1. Start your Engines
- Introduction
- Running a shortest Python program
- How to do it...
- How it works...
- Theres more...
- Ensuring that the Python modules are present
- How to do it...
- How it works...
- There's more...
- A basic Tkinter program
- How to do it...
- How it works...
- Make a compiled executable under Windows and Linux
- Getting ready
- How to do it under MS Windows...
- How to do it under Linux (Debian and Ubuntu)...
- How to compile under both Linux and MS Windows...
- How it works...
- What about py2exe?
- 2. Drawing Fundamental Shapes
- Introduction
- A straight line and the coordinate system
- How to do it...
- How it works...
- There's more...
- Draw a dashed line
- How to do it...
- How it works...
- There's more...
- Lines of varying styles with arrows and endcaps
- How to do it...
- How it works...
- There's more...
- A two segment line with a sharp bend
- How to do it...
- How it works...
- There's more...
- A line with a curved bend
- How to do it...
- How it works...
- There's more...
- Drawing intricate shapes the curly vine
- Getting ready
- How to do it
- How it works...
- There's more...
- Draw a rectangle
- How to do it...
- How it works...
- There's more...
- Draw overlapping rectangles
- How to do it...
- How it works...
- There's more...
- Draw concentric squares
- How to do it...
- How it works...
- A circle from an oval
- How to do it...
- How it works...
- There's more...
- A circle from an arc
- How to do it...
- How it works...
- There's more...
- Three arc ellipses
- How to do it...
- How it works...
- There's more...
- Polygons
- How to do it...
- How it works...
- A star polygon
- How to do it...
- How it works...
- Cloning and resizing stars
- How to do it...
- How it works...
- There's more...
- 3. Handling Text
- Introduction
- Simple text
- How to do it...
- How it works...
- There's more...
- Text font type, size, and color
- Getting ready
- How to do it...
- How it works...
- There's more...
- Getting ready
- How to do it...
- How it works...
- Alignment of text left and right justify
- Getting ready
- How to do it...
- How it works...
- All the fonts available on your computer
- How to do it...
- How it works...
- 4. Animation Principles
- Introduction
- Static shifting of a ball
- How to do it...
- How it works...
- There's more...
- Time-controlled shifting of a ball
- How to do it...
- How it works...
- There's more...
- The robustness of Tkinter
- Complete animation using draw-move-pause-erase cycles
- How to do it...
- How it works...
- There's more...
- More than one moving object
- How to do it...
- How it works...
- There's more...
- A ball that bounces
- How to do it...
- How it works...
- Bouncing in a gravity field
- How to do it...
- How it works...
- There's more...
- See also
- Precise collisions using floating point numbers
- How to do it...
- How it works...
- A graphic debugging tool...
- Trajectory tracing and ball-to-ball collisions
- How to do it...
- How it works...
- There's more...
- Why do we sometimes get tkinter.TckErrors?
- Rotating line
- Getting ready
- How to do it...
- How it works...
- There's more...
- Trajectory tracing on multiple line rotations
- Getting ready
- How to do it...
- How it works...
- There's more...
- A rose for you
- How it works...
- 5. The Magic of Color
- Introduction
- A limited palette of named colors
- How to do it...
- How it works...
- There's more...
- To get fine shadings of the primary colors
- A more compact color list
- Nine ways of specifying color
- How to do it...
- How it works...
- Converting color tuples to Tkinter Hex compatible specifiers
- A red beachball of varying hue
- How to do it...
- How it works...
- There's more...
- A red color wedge of graded hue
- How to do it...
- How it works...
- There's more...
- Newton's grand wheel of color mixing
- How to do it...
- How it works...
- There's more...
- The numerical color mixing matching palette
- How to do it...
- How it works...
- There's more...
- There are other tools to select colors
- Is there a way to make neater slide controllers?
- The animated graded color wheel
- How to do it...
- How it works...
- Tkinter's own color picker-mixer
- How to do it...
- How it works...
- There's more...
- 6. Working with Pictures
- Opening an image file and discovering its attributes
- Getting ready
- How to do it...
- How it works...
- There's more...
- Things we need to know about image formats
- Images and the numbers game
- Open, view, and save an image in a different file format
- Getting ready
- How to do it...
- How it works...
- There's more...
- Image format conversion for JPEG, PNG, TIFF, GIF, BMP
- Getting ready
- How to do it...
- How it works...
- There's more...
- Does size count?
- Image rotation in the plane of the image
- Getting ready
- How to do it...
- How it works...
- There's more...
- Image size alteration
- Getting ready
- How to do it...
- How it works...
- There's more...
- How do we preserve the correct height-to-width ratio of an image?
- Correct proportion image resizing
- Getting ready
- How to do it...
- How it works...
- Separating one color band in an image
- Getting ready
- How to do it...
- How it works...
- There's more...
- Red, green, and blue color alteration in images
- Getting ready
- How to do it...
- How it works...
- There's more...
- Slider controlled color manipulation
- Getting ready
- How to do it...
- How it works...
- Combining images by blending
- Getting ready
- How to do it...
- There's more...
- More Info Section 1
- Blending images by varying percentages
- How to do it...
- How it works...
- There's more...
- Make a composite image using a mask image
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Offset (roll) image horizontally and vertically
- Getting ready
- How to do it...
- How it works...
- Flip horizontally, vertically, and rotate
- Getting ready
- How to do it...
- How it works...
- Filter effects: blur, sharpen, contrast, and so on
- Getting ready
- How to do it...
- How it works...
- Getting ready
- How to do it...
- How it works...
- There's more...
- Opening an image file and discovering its attributes
- 7. Combining Raster and Vector Pictures
- Simple animation of a GIF beach ball
- Getting ready
- How to do it...
- How it works...
- The vector walking creature
- Getting ready
- How to do it...
- How it works...
- There's more...
- More Info Section 1
- Bird with shoes walking in the Karroo
- Getting ready
- How to do it...
- How it works...
- There's more...
- Making GIF images with transparent backgrounds using GIMP
- Getting ready
- How to do it...
- How it works...
- Diplomat walking at the palace
- Getting ready
- How to do it...
- How it works...
- Spider in the forest
- Getting ready
- How to do it...
- How it works...
- There's more...
- Moving band of images
- Getting ready
- How to do it...
- How it works...
- Continuous band of images
- Getting ready
- How to do it...
- How it works...
- Endless background
- Getting ready
- How to do it...
- How it works...
- Simple animation of a GIF beach ball
- 8. Data In and Data Out
- Introduction
- Creation of a new file on a hard drive
- How to do it...
- How it works...
- How to read the newly created file
- Writing data to a newly-created file
- How it works...
- Writing data to multiple files
- How it works...
- Adding data to existing files
- How it works...
- So remember the difference between write and append
- Saving a Tkinter-drawing shape to disk
- Getting ready
- How to do it...
- How it works...
- Storing commands
- Retrieving Python data from disk storage
- Getting ready
- How it works...
- Simple mouse input
- How it works...
- There's more...
- Storing and retrieving a mouse-drawn shape
- Getting ready
- How it works...
- There's more...
- We need to edit mistakes
- A mouse-line editor
- Getting ready
- How it works...
- There's more...
- Why don't we add more features?
- Using other tools to acquire and re-work images
- How to exploit that mouse
- We can measure the distance along a meandering line
- All possible mouse actions
- How to do it...
- How it works...
- There's more...
- 9. Exchanging Inkscape SVG Drawings with Tkinter Shapes
- Introduction
- The structure of an SVG drawing
- Getting ready
- How to do it...
- How it works...
- There's more...
- SVG code for separate paths
- Tracing the shape of an image in Inkscape
- Getting ready
- How to do it...
- How often do we need to click the mouse?
- Another way to get SVG paths from raster images
- Converting an SVG path into a Tkinter Line
- Getting ready
- How to do it...
- How it works...
- There's more...
- How far should we go with image conversion code?
- Another way to get SVG paths from raster images
- 10. GUI Construction: Part 1
- Introduction
- Widget configuration a label
- How to do it...
- How it works...
- There's more...
- Button focus
- How to do it...
- How it works...
- There's more...
- The simplest push button with validation
- How to do it...
- How it works...
- There's more...
- Buttons behave differently on Windows
- A data entry box
- How to do it...
- How it works...
- There's more...
- Did we keep things simple?
- Single-line versus multi-line entry
- The Clever Geometry Manager
- Colored button causing a message pop-up
- How to do it...
- How it works...
- Complex interaction between buttons
- How to do it...
- How it works...
- Images on buttons and button packing
- How to do it...
- How it works...
- There's more...
- Grid Geometry Manager and button arrays
- How to do it...
- How it works...
- There's more...
- Drop-down menus to select from a list
- How to do it...
- How it works...
- Listbox variable selection
- How to do it...
- How it works...
- Text in a window
- How to do it...
- How it works...
- 11. GUI Construction: Part 2
- Introduction
- The Grid Layout Geometry Manager
- Getting ready
- How to do it...
- How it works...
- There's more...
- The Pack Geometry Manager
- Getting ready
- How to do it...
- How it works...
- Radiobuttons to select one from many
- How to do it...
- How it works...
- Checkbuttons (Tickboxes) to select some of many
- How to do it...
- How it works...
- Key-stroke event handling
- How to do it...
- How it works...
- Scrollbar
- How to do it...
- How it works...
- There's more...
- Custom DIY controller widgets
- How to do it...
- How it works...
- There's more...
- Organizing widgets inside frames
- How to do it...
- How it works...
- There's more...
- A. Quick tips for running Python programs in Microsoft Windows
- Running Python programs in Microsoft Windows
- Where will we find the windows installer?
- Do we have to use Python version 2.7?
- Why do we get "python is not recognized"?
- Index
- Title: Python 2.6 Graphics Cookbook. Learn how to use Python’s built-in graphics capabilities to create static and animated graphics for a range of real-world purposes. Over 100 recipes take you from basic shape creation to developing interactive GUIs
- Author: Mike Ohlson de Fine, Michael J Ohlson
- Original title: Python 2.6 Graphics Cookbook. Learn how to use Python’s built-in graphics capabilities to create static and animated graphics for a range of real-world purposes. Over 100 recipes take you from basic shape creation to developing interactive GUIs.
- ISBN: 9781849513852, 9781849513852
- Date of issue: 2010-11-24
- Format: Ebook
- Item ID: e_3cdw
- Publisher: Packt Publishing