LIBEUNOMIA
読み取り中…
検索中…
一致する文字列を見つけられません
picture_rgba.h
[詳解]
1/*
2 * Copyright 2001-2021 oZ/acy (名賀月晃嗣)
3 * Redistribution and use in source and binary forms,
4 * with or without modification,
5 * are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 */
36#ifndef INCLUDE_GUARD_EUNOMIA_PICTURE_RGBA_H
37#define INCLUDE_GUARD_EUNOMIA_PICTURE_RGBA_H
38
39#include <memory>
40#include "imagebuffer.h"
41#include "colour.h"
42
43
44namespace eunomia
45{
46 class Picture;
47 class PictureIndexed;
48
49
53class PictureRgba : public ImageBuffer<RgbaColour>
54{
55private:
57 std::unique_ptr<RgbaColour[]> upbuf_;
58
59protected:
63 PictureRgba(unsigned w, unsigned h);
64
65public:
67 static std::unique_ptr<PictureRgba> create(unsigned w, unsigned h) noexcept;
68
70 std::unique_ptr<PictureRgba> clone() const noexcept;
71
75 std::unique_ptr<Picture> stripAlpha() const noexcept;
76
80 std::unique_ptr<PictureIndexed>
81 createGrayscaledPictureIndexed() const noexcept;
82
86 std::unique_ptr<PictureIndexed> duplicatePictureIndexed() const noexcept;
87
99 std::unique_ptr<PictureRgba>
100 magnify(int w, int h, double a = -1.0) const noexcept;
101
105 std::unique_ptr<PictureRgba> reduce(int w, int h) const noexcept;
106};
107
108
109}// end of namespace eunomia
110
111
112
113
114#endif // INCLUDE_GUARD_EUNOMIA_PICTURE_RGBA_H
畫像バッファ基底クラステンプレート
Definition imagebuffer.h:84
RGBA32bitの畫像バッファ
Definition picture_rgba.h:54
std::unique_ptr< PictureRgba > clone() const noexcept
複製
Definition picture_rgba.cpp:60
std::unique_ptr< PictureRgba > reduce(int w, int h) const noexcept
縮小
Definition pictrgba_reduce.cpp:112
std::unique_ptr< PictureIndexed > createGrayscaledPictureIndexed() const noexcept
グレイスケール化複製
Definition pictrgba_grayscaled.cpp:39
std::unique_ptr< PictureIndexed > duplicatePictureIndexed() const noexcept
減色(インデックスカラー化)
Definition pictrgba_dupl_pictidx.cpp:41
static std::unique_ptr< PictureRgba > create(unsigned w, unsigned h) noexcept
畫像バッファ生成
Definition picture_rgba.cpp:48
PictureRgba(unsigned w, unsigned h)
構築子
Definition picture_rgba.cpp:38
std::unique_ptr< PictureRgba > magnify(int w, int h, double a=-1.0) const noexcept
擴大
Definition pictrgba_magnify.cpp:42
std::unique_ptr< Picture > stripAlpha() const noexcept
αチャネル除去
Definition pictrgba_stripalpha.cpp:42
RGB24bit色及びRGBA32bit色
畫像バッファクラステンプレート
Definition colour.h:49