fontoptions.h

Go to the documentation of this file.
00001 /* Copyright (C) 2005 The cairomm Development Team
00002  *
00003  * This library is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU Library General Public
00005  * License as published by the Free Software Foundation; either
00006  * version 2 of the License, or (at your option) any later version.
00007  *
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Library General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Library General Public
00014  * License along with this library; if not, write to the Free Software
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016  * 02110-1301, USA.
00017  */
00018 
00019 #ifndef __CAIROMM_FONTOPTIONS_H
00020 #define __CAIROMM_FONTOPTIONS_H
00021 
00022 #include <cairomm/enums.h>
00023 #include <string>
00024 #include <cairo.h>
00025 
00026 
00027 namespace Cairo
00028 {
00029 
00032 class FontOptions
00033 {
00034 public:
00035   FontOptions();
00036   explicit FontOptions(cairo_font_options_t* cobject, bool take_ownership = false);
00037   FontOptions(const FontOptions& src);
00038 
00039   virtual ~FontOptions();
00040 
00041   FontOptions& operator=(const FontOptions& src);
00042 
00043   bool operator ==(const FontOptions& src) const;
00044   //bool operator !=(const FontOptions& src) const;
00045 
00046   void merge(const FontOptions& other);
00047 
00048   unsigned long hash() const;
00049 
00050   void set_antialias(Antialias antialias);
00051   Antialias get_antialias() const;
00052 
00053   void set_subpixel_order(SubpixelOrder subpixel_order);
00054   SubpixelOrder get_subpixel_order() const;
00055 
00056   void set_hint_style(HintStyle hint_style);
00057   HintStyle get_hint_style() const;
00058 
00059   void set_hint_metrics(HintMetrics hint_metrics);
00060   HintMetrics get_hint_metrics() const;
00061 
00062   typedef cairo_font_options_t cobject;
00063   inline cobject* cobj() { return m_cobject; }
00064   inline const cobject* cobj() const { return m_cobject; }
00065 
00066   #ifndef DOXYGEN_IGNORE_THIS
00068   inline ErrorStatus get_status() const
00069   { return cairo_font_options_status(const_cast<cairo_font_options_t*>(cobj())); }
00070   #endif //DOXYGEN_IGNORE_THIS
00071 
00072 protected:
00073 
00074   cobject* m_cobject;
00075 };
00076 
00077 } // namespace Cairo
00078 
00079 #endif //__CAIROMM_FONTOPTIONS_H
00080 
00081 // vim: ts=2 sw=2 et

Generated on Thu Sep 4 21:57:13 2008 for cairomm by  doxygen 1.5.5