~feng-kylin/ubuntu-kylin-wizard/trunk

« back to all changes in this revision

Viewing changes to rawpixel.h

  • Committer: handsome_feng
  • Date: 2016-06-14 01:50:34 UTC
  • Revision ID: 445865575@qq.com-20160614015034-ufmgakiqtgvgg0x9
UseĀ cssĀ file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
 
/*
3
 
 * Copyright (C) 2014 Canonical Ltd
4
 
 *
5
 
 * This program is free software: you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License version 3 as
7
 
 * published by the Free Software Foundation.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
 *
17
 
 * Authored by: Brandon Schaefer <brandon.schaefer@canonical.com>
18
 
 */
19
 
 
20
 
#ifndef RAW_PIXEL_H
21
 
#define RAW_PIXEL_H
22
 
 
23
 
#include "EMConverter.h"
24
 
 
25
 
class RawPixel
26
 
{
27
 
public:
28
 
  RawPixel(double raw_pixel = 0);
29
 
 
30
 
  int CP(EMConverter::Ptr const&) const;
31
 
  int CP(double scale) const;
32
 
 
33
 
  operator int() const;
34
 
 
35
 
private:
36
 
  double raw_pixel_;
37
 
};
38
 
 
39
 
// User-Defined Literals (ex: 10_em, 10.0_em)
40
 
RawPixel operator"" _em(long double pixel);
41
 
RawPixel operator"" _em(unsigned long long pixel);
42
 
 
43
 
#endif // RAW_PIXEL_H