Development/Tutorials/Games/Palapeli Slicers: Difference between revisions

From KDE TechBase
(tutorial browser)
 
(abstract and structure paragraphs)
Line 7: Line 7:


{{Box|Warning to editors|I'm currently creating this tutorial. You should not edit this page in the mean time. -- [[User:Majewsky|Majewsky]] 18:19, 20 July 2008 (CEST)}}
{{Box|Warning to editors|I'm currently creating this tutorial. You should not edit this page in the mean time. -- [[User:Majewsky|Majewsky]] 18:19, 20 July 2008 (CEST)}}
== 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 [http://api.kde.org/playground-api/games-apidocs/palapeli/lib/html/classPalapeli_1_1PatternConfiguration.html Palapeli::PatternConfiguration]) tells Palapeli what features this pattern plugin has and which configuration values it needs. The second one (derived from [http://api.kde.org/playground-api/games-apidocs/palapeli/lib/html/classPalapeli_1_1Pattern.html Palapeli::Pattern]) does the actual slicing.
== The code ==

Revision as of 16:27, 20 July 2008

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.

The code