papyrus logo

hilbert.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #ifndef PAPYRUSHILBERT_H
00021 #define PAPYRUSHILBERT_H
00022 
00023 #include <papyrus/polyline.h>
00024 
00025 namespace Papyrus
00026 {
00027 
00031   class Hilbert : public Polyline
00032   {
00033     protected:
00034 
00035       Hilbert ( const Glib::ustring& id, unsigned level, double size, Fill::pointer fill, Stroke::pointer stroke );
00036 
00037     public:
00038       PAPYRUS_DRAWABLE(Hilbert);
00039 
00040       static pointer create ( unsigned level=0, double size=0, Fill::pointer fill = Fill::pointer(), Stroke::pointer stroke = Stroke::pointer() );
00041 
00042       static pointer create ( const Glib::ustring& id, unsigned level=0, double size=0, Fill::pointer fill = Fill::pointer(), Stroke::pointer stroke = Stroke::pointer() );
00043 
00044       virtual ~Hilbert();
00045 
00046       unsigned level();
00047 
00048       void set_level ( unsigned level );
00049 
00050       double size();
00051 
00052       void set_size ( double size );
00053 
00054     protected:
00055       unsigned m_level;
00056       double m_size;
00057       double m_lsize;
00058 
00059       void create_vertices();
00060 
00061       void hilbert_a ( unsigned level );
00062 
00063       void hilbert_b ( unsigned level );
00064 
00065       void hilbert_c ( unsigned level );
00066 
00067       void hilbert_d ( unsigned level );
00068 
00069   };
00070 
00071 }
00072 
00073 #endif

Generated on Fri Apr 16 12:40:10 2010 for papyrus by doxygen 1.6.1