45#ifndef INCLUDE_GUARD_URANIA_PAINTDEVICE_H
46#define INCLUDE_GUARD_URANIA_PAINTDEVICE_H
54#include <eunomia/picture.h>
55#include <eunomia/picture_indexed.h>
69 constexpr Color(std::uint8_t r, std::uint8_t g, std::uint8_t b) noexcept
72 constexpr Color(
const eunomia::RgbColour& org) noexcept
75 constexpr explicit Color(COLORREF cr) noexcept
76 :
blue(GetBValue(cr)),
green(GetGValue(cr)),
red(GetRValue(cr))
91 | ((std::uint8_t)
green << 8)
92 | ((std::uint8_t)
blue << 16);
95 constexpr operator eunomia::RgbColour() const noexcept
104 class PaintMemDevice;
105 class PaintMemDeviceIndexed;
135 static std::unique_ptr<PaintMemDevice>
create(
unsigned w,
unsigned h);
143 std::unique_ptr<PaintMemDevice>
duplicate(
const eunomia::Picture& pct);
151 std::unique_ptr<PaintMemDevice>
clone()
const;
179 static std::unique_ptr<PaintMemDeviceIndexed>
create(
unsigned w,
unsigned h);
186 static std::unique_ptr<PaintMemDeviceIndexed>
187 duplicate(
const eunomia::PictureIndexed& pct);
195 std::unique_ptr<PaintMemDeviceIndexed>
clone()
const;
244 std::unique_ptr<PaintDevice>
274 int x1,
int y1,
int x2,
int y2,
const urania::Color& col,
bool f =
false);
284 int x,
int y,
int a,
int b,
const urania::Color& col,
bool f =
false);
327 int size,
const std::wstring& fn,
bool ro,
bool fx,
328 bool bo,
bool itl,
bool ul,
bool sk);
350 const std::optional<eunomia::Rect>& cliprect = std::nullopt);
364 const std::optional<eunomia::Rect>& cliprect = std::nullopt);
402 return Color(::GetSysColor(
id));
Windows用BGRカラー構造體
Definition paintdev.h:61
Color & operator=(const eunomia::RgbColour &org) noexcept
Definition paintdev.h:79
std::uint8_t green
Definition paintdev.h:64
constexpr Color(COLORREF cr) noexcept
Definition paintdev.h:75
constexpr Color(const eunomia::RgbColour &org) noexcept
Definition paintdev.h:72
constexpr Color() noexcept
Definition paintdev.h:68
constexpr Color(std::uint8_t r, std::uint8_t g, std::uint8_t b) noexcept
Definition paintdev.h:69
std::uint8_t red
Definition paintdev.h:65
constexpr COLORREF getColorref() const noexcept
Definition paintdev.h:87
std::uint8_t blue
Definition paintdev.h:63
Definition paintdev.h:212
int width_
Definition paintdev.h:218
void blt(const urania::PaintMemDevice &src, int sx, int sy, int w, int h, int dx, int dy, const std::optional< eunomia::Rect > &cliprect=std::nullopt)
轉送
Definition pdev.cpp:115
void stretchBlt(const urania::PaintMemDevice &src)
轉送
Definition pdev.cpp:186
static std::unique_ptr< PaintDevice > create(HDC dc, DestProc dp, void *a, int w, int h)
Definition pdev.cpp:84
HFONT oft_
Definition paintdev.h:222
void circle(int x, int y, int r, const urania::Color &col, bool f=false)
Definition paintdev.h:292
HDC hdc_
Definition paintdev.h:217
DestProc dst_
Definition paintdev.h:226
void(* DestProc)(HDC, void *)
Definition paintdev.h:214
static void setSysColor(int id, const urania::Color &col)
システムカラーの設定
Definition pdev.cpp:95
void * app_
Definition paintdev.h:225
void dotset(int x, int y, const urania::Color &col)
Definition pdev2.cpp:138
PaintDevice(HDC dc, DestProc dp, void *a, int w, int h)
Definition pdev.cpp:45
int height() const
描畫領域の高さを取得する。
Definition paintdev.h:335
int width() const
描畫領域の幅を取得する。
Definition paintdev.h:332
eunomia::Point text(int x, int y, const std::wstring &str, const urania::Color &col)
Definition pdev2.cpp:150
void line(int x1, int y1, int x2, int y2, const urania::Color &col)
Definition pdev2.cpp:104
void clear(const urania::Color &col)
Definition pdev.cpp:103
int height_
Definition paintdev.h:218
void ellipse(int x, int y, int a, int b, const urania::Color &col, bool f=false)
Definition pdev2.cpp:118
int obm_
Definition paintdev.h:223
static urania::Color getSysColor(int id)
システムカラーの取得
Definition paintdev.h:400
HPEN opn_
Definition paintdev.h:221
void changeFont(int size, const std::wstring &fn, bool ro, bool fx, bool bo, bool itl, bool ul, bool sk)
Definition pdev2.cpp:217
HBRUSH obr_
Definition paintdev.h:220
void box(int x1, int y1, int x2, int y2, const urania::Color &col, bool f=false)
Definition pdev2.cpp:72
~PaintDevice()
Definition pdev.cpp:64
Definition paintdev.h:160
static std::unique_ptr< PaintMemDeviceIndexed > duplicate(const eunomia::PictureIndexed &pct)
PictureIndexedからのPaintMemDeviceIndexedの複製
Definition pmdidx.cpp:223
urania::Color oldpal_[256]
Definition paintdev.h:168
HDC hdc_
Definition paintdev.h:164
urania::Color pal_[256]
Definition paintdev.h:165
const urania::Color * paletteBuffer() const noexcept
Definition paintdev.h:200
urania::Color * paletteBuffer() noexcept
Definition paintdev.h:199
HPALETTE hpal_
Definition paintdev.h:166
static std::unique_ptr< PaintMemDeviceIndexed > create(unsigned w, unsigned h)
生成
Definition pmdidx.cpp:205
std::unique_ptr< PaintMemDeviceIndexed > clone() const
複製
Definition pmdidx.cpp:286
~PaintMemDeviceIndexed()
Definition pmdidx.cpp:160
urania::Color & palette(int id)
Definition paintdev.h:197
const urania::Color & palette(int id) const
Definition paintdev.h:198
std::unique_ptr< eunomia::PictureIndexed > duplicatePictureIndexed() const
PictureIndexed複製
Definition pmdidx.cpp:259
PaintMemDeviceIndexed(unsigned ww, unsigned hh)
Definition pmdidx.cpp:80
void updatePalette()
パレットハンドルを更新する。
Definition pmdidx.cpp:177
HBITMAP oldbmp_
Definition paintdev.h:167
PaintDevice互換メモリ上假想デバイス(24bit color)
Definition paintdev.h:117
HDC hdc_
Definition paintdev.h:121
static std::unique_ptr< PaintMemDevice > duplicate(const eunomia::Picture &pct)
PictureからのPaintMemDeviceの複製
Definition pmdev.cpp:124
PaintMemDevice(unsigned ww, unsigned hh)
Definition pmdev.cpp:43
~PaintMemDevice()
Definition pmdev.cpp:96
std::unique_ptr< eunomia::Picture > duplicatePicture() const
Picture複製
Definition pmdev.cpp:150
std::unique_ptr< PaintMemDevice > clone() const
複製
Definition pmdev.cpp:169
HBITMAP oldbmp_
Definition paintdev.h:122
static std::unique_ptr< PaintMemDevice > create(unsigned w, unsigned h)
生成
Definition pmdev.cpp:108