Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_cssnumbervalue.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FXCRT_CSS_CFX_CSSNUMBERVALUE_H_
8#define CORE_FXCRT_CSS_CFX_CSSNUMBERVALUE_H_
9
10#include "core/fxcrt/css/cfx_cssvalue.h"
11
12class CFX_CSSNumberValue final : public CFX_CSSValue {
13 public:
14 enum class Unit {
15 kNumber,
17 kEMS,
18 kEXS,
19 kPixels,
22 kInches,
23 kPoints,
24 kPicas,
25 };
26
27 CFX_CSSNumberValue(Unit unit, float value);
28 ~CFX_CSSNumberValue() override;
29
30 Unit unit() const { return unit_; }
31 float value() const { return value_; }
32 float Apply(float percentBase) const;
33
34 private:
35 Unit unit_;
36 float value_;
37};
38
39#endif // CORE_FXCRT_CSS_CFX_CSSNUMBERVALUE_H_
CFX_CSSPropertyValue
Definition cfx_css.h:35
CFX_CSSProperty
Definition cfx_css.h:28
static const Property * GetPropertyByEnum(CFX_CSSProperty property)
static const Color * GetColorByName(WideStringView wsName)
static const LengthUnit * GetLengthUnitByName(WideStringView wsName)
static const Property * GetPropertyByName(WideStringView name)
static const PropertyValue * GetPropertyValueByName(WideStringView wsName)
CFX_CSSNumberValue(Unit unit, float value)
float Apply(float percentBase) const
~CFX_CSSNumberValue() override
const wchar_t * name
Definition cfx_cssdata.h:35
CFX_CSSNumberValue::Unit type
Definition cfx_cssdata.h:31
const wchar_t * value
Definition cfx_cssdata.h:30
CFX_CSSPropertyValue eName
Definition cfx_cssdata.h:25
CFX_CSSValueTypeMask dwTypes
Definition cfx_cssdata.h:21
CFX_CSSProperty eName
Definition cfx_cssdata.h:19