Development/Tutorials/Games/Palapeli Slicers
< Development | Tutorials
Creating a Palapeli pattern
Tutorial Series | Programming with the Palapeli API |
Previous | Introduction to KDE4 programming |
What's Next | n/a |
Further Reading | Palapeli::Pattern, Palapeli::PatternConfiguration |
I'm currently creating this tutorial. You should not edit this page in the mean time. -- Majewsky 18:19, 20 July 2008 (CEST)
Warning to editors
Abstract
This tutorial shows you how to create a pattern for Palapeli, that is: a plugin for the Palapeli libraries that describes an algorithm to split an image into pieces.
The pattern we will be constructing is quite easy: It splits an image into two equally sized pieces.
Structure
A pattern plugin consists of two classes. The first one (derived from Palapeli::PatternConfiguration) tells Palapeli what features this pattern plugin has and which configuration values it needs. The second one (derived from Palapeli::Pattern) does the actual slicing.