deltille.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PAPYRUSDELTILLE_H
00021 #define PAPYRUSDELTILLE_H
00022
00023 #include <papyrus-extras/tiling.h>
00024
00025 namespace Papyrus
00026 {
00027
00031 class Deltille : public Tiling
00032 {
00033 protected:
00034
00035 Deltille ( const Glib::ustring& id, unsigned rows, unsigned columns, double side_length );
00036
00037 public:
00038 typedef PapyrusPointer<Deltille> pointer;
00039
00040 static pointer create ( unsigned rows=0, unsigned columns=0, double side_length=1.0 );
00041
00042 static pointer create ( const Glib::ustring& id, unsigned rows, unsigned columns, double side_length );
00043
00044 virtual ~Deltille();
00045
00046 virtual void draw ( Cairo::RefPtr<Cairo::Context> cairo ) const;
00047
00048 PAPYRUS_CLASS_NAME ( "Deltille" );
00049
00050 PAPYRUS_CLONE_METHOD ( Deltille );
00051
00052 protected:
00053
00054 void draw_path( Cairo::RefPtr<Cairo::Context> cairo, unsigned col, unsigned row, double side, double half_side, double height ) const;
00055
00056 virtual void update_centroid_x();
00057
00058 virtual void update_centroid_y();
00059
00060 virtual void update_centroid();
00061
00062
00063 };
00064
00065 }
00066
00067 #endif