Back to index

nux  3.0.0
EMMetrics.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2012 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 3 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program 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
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Mirco Müller <mirco.mueller@canonical.com
00017  */
00018 
00019 #ifndef NUX_EMMETRICS_H
00020 #define NUX_EMMETRICS_H
00021 
00022 #include <X11/Xlib.h>
00023 
00024 namespace nux
00025 {
00026   class EMMetrics
00027   {
00028     public:
00029       EMMetrics(Display* dpy, int scr, double points);
00030 
00031       double Pixel2EM(int value);
00032       int EM2Pixel(double value);
00033 
00034     private:
00035       double pixels_per_em_;
00036   };
00037 }
00038 
00039 #endif // NUX_EMMETRICS_H