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
cfgas_gecolor.cpp
Go to the documentation of this file.
1// Copyright 2016 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#include "xfa/fgas/graphics/cfgas_gecolor.h"
8
9CFGAS_GEColor::CFGAS_GEColor(FX_ARGB argb) : m_type(Solid), m_argb(argb) {}
10
11CFGAS_GEColor::CFGAS_GEColor(CFGAS_GEPattern* pattern, FX_ARGB argb)
12 : m_type(Pattern), m_argb(argb), m_pPattern(pattern) {}
13
14CFGAS_GEColor::CFGAS_GEColor(CFGAS_GEShading* shading)
15 : m_type(Shading), m_pShading(shading) {}
16
17CFGAS_GEColor::CFGAS_GEColor(const CFGAS_GEColor& that) = default;
18
19CFGAS_GEColor::~CFGAS_GEColor() = default;
20
21CFGAS_GEColor& CFGAS_GEColor::operator=(const CFGAS_GEColor& that) = default;
22
23// static
25 FX_BGR_STRUCT<uint8_t> bgr = ArgbToBGRStruct(argb);
26 return ByteString::Format("%d,%d,%d", bgr.red, bgr.green, bgr.blue);
27}
fxcrt::ByteString ByteString
Definition bytestring.h:180
CFGAS_GEColor & operator=(const CFGAS_GEColor &that)
CFGAS_GEColor(const CFGAS_GEColor &that)
static ByteString ColorToString(FX_ARGB argb)
CFGAS_GEColor(FX_ARGB argb)
CFGAS_GEColor(CFGAS_GEPattern *pattern, FX_ARGB argb)
CFGAS_GEColor(CFGAS_GEShading *shading)
static ByteString Format(const char *pFormat,...)
uint32_t FX_ARGB
Definition fx_dib.h:36