MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
ramCanvas.hpp
Go to the documentation of this file.
1// -*- Mode:C++; Coding:us-ascii-unix; fill-column:158 -*-
2/*******************************************************************************************************************************************************.H.S.**/
3/**
4 @file ramCanvas.hpp
5 @author Mitch Richling <https://www.mitchr.me>
6 @brief User include file for ramCanvas types.@EOL@EOL
7 @copyright
8 @parblock
9 Copyright (c) 1988-2015, Mitchell Jay Richling <https://www.mitchr.me> All rights reserved.
10
11 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
12
13 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
14
15 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17
18 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software
19 without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26 DAMAGE.
27 @endparblock
28*/
29/*******************************************************************************************************************************************************.H.E.**/
30
31#ifndef MJR_INCLUDE_ramCanvas
32
33#include "MRcolor.hpp"
34#include "ramCanvasTpl.hpp"
35
36// Put everything in the mjr namespace
37namespace mjr {
38
39 /** @name Simple Canvas Coordinate Types */
40 //@{
41 typedef double rcSimpleFltCrdT; //!< Real coordinate type
42 typedef int rcSimpleIntCrdT; //!< Integer coordinate type
43 //@}
44
45 /** @name Simple Color Canvas Type (8 channels at 8 bits per channel) */
46 //@{
47 typedef ramCanvasTpl<color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas8c8b; //!< Canvas type: generic 64-bit with 8 channels at 8-bit uint per channel.
48 //@}
49
50 /** @name Simple Color Canvas Types (3 and 4 channels at 8 bits per channel) */
51 //@{
52 typedef ramCanvasTpl<color4c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c8b; //!< Canvas type: generic 32-bit with 4 channels at 8-bit uint per channel.
53 typedef ramCanvasTpl<color3c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c8b; //!< Canvas type: generic 24-bit with 3 channels at 8-bit uint per channel.
54 typedef ramCanvas4c8b ramCanvasRGBA8b; //!< Canvas type: 24-bit true color with alpha last (RGBA) -- 4 channels at 8-bit uint per channel.
55 typedef ramCanvas3c8b ramCanvasRGB8b; //!< Canvas type: 24-bit true color without alpha (RGB) -- 3 channels at 8-bit uint per channel.
56 //@}
57
58 /** @name Simple Color Canvas Types (3 and 4 channels at 16 bits per channel) */
59 //@{
60 typedef ramCanvasTpl<color4c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c16b; //!< Canvas type: Generic 64-bit with 4 channels at 16-bit uint per channel.
61 typedef ramCanvasTpl<color3c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c16b; //!< Canvas type: Generic 48-bit with 4 channels at 16-bit uint per channel.
62 typedef ramCanvas4c16b ramCanvasRGBA16b; //!< Canvas type: 48-bit true color with alpha (RGBA) -- 4 channels at 16-bit uint per channel.
63 typedef ramCanvas3c16b ramCanvasRGB16b; //!< Canvas type: 48-bit true color without alpha (RGB) -- 3 channels at 16-bit uint per channel.
64 //@}
65
66 /** @name Simple Color Canvas Types (3 and 4 channels at 32 bits per channel) */
67 //@{
68 typedef ramCanvasTpl<color4c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c32b; //!< Canvas type: Generic 64-bit with 4 channels at 32-bit uint per channel.
69 typedef ramCanvasTpl<color3c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c32b; //!< Canvas type: Generic 48-bit with 4 channels at 32-bit uint per channel.
70 typedef ramCanvas4c32b ramCanvasRGBA32b; //!< Canvas type: 48-bit true color with alpha (RGBA) -- 4 channels at 32-bit uint per channel.
71 typedef ramCanvas3c32b ramCanvasRGB32b; //!< Canvas type: 48-bit true color without alpha (RGB) -- 3 channels at 32-bit uint per channel.
72 //@}
73
74 /** @name Simple Color Canvas Types (3 and 4 channels at 64 bits per channel) */
75 //@{
76 typedef ramCanvasTpl<color4c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c64b; //!< Canvas type: Generic 64-bit with 4 channels at 64-bit uint per channel.
77 typedef ramCanvasTpl<color3c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c64b; //!< Canvas type: Generic 48-bit with 4 channels at 64-bit uint per channel.
78 typedef ramCanvas4c64b ramCanvasRGBA64b; //!< Canvas type: 48-bit true color with alpha (RGBA) -- 4 channels at 64-bit uint per channel.
79 typedef ramCanvas3c64b ramCanvasRGB64b; //!< Canvas type: 48-bit true color without alpha (RGB) -- 3 channels at 64-bit uint per channel.
80 //@}
81
82 /** @name Simple Monochrome Canvas Types (1 channel uint at various depths) */
83 //@{
84 typedef ramCanvasTpl<color1c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c8b; //!< Canvas type: 8-bit uint grey-scale -- 1 channel, 8-bit.
85 typedef ramCanvasTpl<color1c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c16b; //!< Canvas type: 16-bit uint grey-scale -- 1 channel, 16-bit.
86 typedef ramCanvasTpl<color1c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c32b; //!< Canvas type: 32-bit uint grey-scale -- 1 channel, 32-bit.
87 typedef ramCanvasTpl<color1c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c64b; //!< Canvas type: 64-bit uint grey-scale -- 1 channel, 64-bit.
88#ifdef MJR_HAVE_128_BIT_TYPES
89 typedef ramCanvasTpl<color1c128b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c128b; //!< Canvas type: 128-bit uint grey-scale -- 1 channel, 128-bit.
90#endif
91
92 typedef ramCanvasTpl<color1c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c32F; //!< Canvas type: 32-bit single float grey-scale -- 1 channel, 32-bit.
93 typedef ramCanvasTpl<color1c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas1c64F; //!< Canvas type: 64-bit double float grey-scale -- 1 channel, 64-bit.
94 //@}
95
96 /** @name Simple Color Canvas Types (3 and 4 channels with double float channels) */
97 //@{
98 typedef ramCanvasTpl<color4c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c64F; //!< Canvas type: generic 4 channels with double float channels
99 typedef ramCanvasTpl<color3c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c64F; //!< Canvas type: generic 3 channels with double float channels
100 typedef ramCanvas4c64F ramCanvasRGBA64F; //!< Canvas type: RGBA with double float channels
101 typedef ramCanvas3c64F ramCanvasRGB64F; //!< Canvas type: RGB with double float channels
102 //@}
103
104 /** @name Simple Color Canvas Types (3 and 4 channels with single float channels) */
105 //@{
106 typedef ramCanvasTpl<color4c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas4c32F; //!< Canvas type: generic 4 channels with single float channels
107 typedef ramCanvasTpl<color3c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvas3c32F; //!< Canvas type: generic 3 channels with single float channels
108 typedef ramCanvas4c32F ramCanvasRGBA32F; //!< Canvas type: RGBA with single float channels
109 typedef ramCanvas3c32F ramCanvasRGB32F; //!< Canvas type: RGB with single float channels
110 //@}
111
112 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
113 /** @name Simple Color Canvas Types with 8-bit channels and commonly used orderings for R, G, B, & A.
114 These are commonly used by libraries like Cairo, Open GL, SDL, etc... */
115 //@{
116 typedef ramCanvasTpl<colorBGR8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvasBGR8b; //!< colorTpl: 3 Channel @ 8-bit unsigned int channels BGR8b
117 typedef ramCanvasTpl<colorARGB8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvasARGB8b; //!< colorTpl: 4 Channel @ 8-bit unsigned int channels ARGB8b
118 typedef ramCanvasTpl<colorBGRA8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvasBGRA8b; //!< colorTpl: 4 Channel @ 8-bit unsigned int channels BGRA8b
119 typedef ramCanvasTpl<colorABGR8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false> ramCanvasABGR8b; //!< colorTpl: 4 Channel @ 8-bit unsigned int channels ABGR8b
120 //@}
121
122} // end namespace mjr
123
124#define MJR_INCLUDE_ramCanvas
125#endif
User include file for color types.
Class providing off-screen drawing functionality.
ramCanvasTpl< color1c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c8b
Canvas type: 8-bit uint grey-scale – 1 channel, 8-bit.
Definition ramCanvas.hpp:84
int rcSimpleIntCrdT
Integer coordinate type.
Definition ramCanvas.hpp:42
ramCanvas4c32F ramCanvasRGBA32F
Canvas type: RGBA with single float channels.
ramCanvasTpl< color4c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c64F
Canvas type: generic 4 channels with double float channels.
Definition ramCanvas.hpp:98
ramCanvas4c16b ramCanvasRGBA16b
Canvas type: 48-bit true color with alpha (RGBA) – 4 channels at 16-bit uint per channel.
Definition ramCanvas.hpp:62
ramCanvasTpl< color3c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c32F
Canvas type: generic 3 channels with single float channels.
ramCanvasTpl< color3c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c8b
Canvas type: generic 24-bit with 3 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:53
ramCanvasTpl< color1c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c32b
Canvas type: 32-bit uint grey-scale – 1 channel, 32-bit.
Definition ramCanvas.hpp:86
ramCanvasTpl< color1c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c64b
Canvas type: 64-bit uint grey-scale – 1 channel, 64-bit.
Definition ramCanvas.hpp:87
ramCanvasTpl< color1c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c16b
Canvas type: 16-bit uint grey-scale – 1 channel, 16-bit.
Definition ramCanvas.hpp:85
ramCanvasTpl< colorBGRA8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvasBGRA8b
colorTpl: 4 Channel @ 8-bit unsigned int channels BGRA8b
ramCanvasTpl< color4c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c32F
Canvas type: generic 4 channels with single float channels.
ramCanvas3c32b ramCanvasRGB32b
Canvas type: 48-bit true color without alpha (RGB) – 3 channels at 32-bit uint per channel.
Definition ramCanvas.hpp:71
ramCanvasTpl< color4c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c64b
Canvas type: Generic 64-bit with 4 channels at 64-bit uint per channel.
Definition ramCanvas.hpp:76
double rcSimpleFltCrdT
Real coordinate type.
Definition ramCanvas.hpp:41
ramCanvas4c8b ramCanvasRGBA8b
Canvas type: 24-bit true color with alpha last (RGBA) – 4 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:54
ramCanvasTpl< colorABGR8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvasABGR8b
colorTpl: 4 Channel @ 8-bit unsigned int channels ABGR8b
ramCanvas3c8b ramCanvasRGB8b
Canvas type: 24-bit true color without alpha (RGB) – 3 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:55
ramCanvasTpl< color4c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c16b
Canvas type: Generic 64-bit with 4 channels at 16-bit uint per channel.
Definition ramCanvas.hpp:60
ramCanvasTpl< color3c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c32b
Canvas type: Generic 48-bit with 4 channels at 32-bit uint per channel.
Definition ramCanvas.hpp:69
ramCanvas3c64F ramCanvasRGB64F
Canvas type: RGB with double float channels.
ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas8c8b
Canvas type: generic 64-bit with 8 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:47
ramCanvasTpl< color3c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c64F
Canvas type: generic 3 channels with double float channels.
Definition ramCanvas.hpp:99
ramCanvas3c32F ramCanvasRGB32F
Canvas type: RGB with single float channels.
ramCanvas4c64b ramCanvasRGBA64b
Canvas type: 48-bit true color with alpha (RGBA) – 4 channels at 64-bit uint per channel.
Definition ramCanvas.hpp:78
ramCanvasTpl< color3c64b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c64b
Canvas type: Generic 48-bit with 4 channels at 64-bit uint per channel.
Definition ramCanvas.hpp:77
ramCanvasTpl< color3c16b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c16b
Canvas type: Generic 48-bit with 4 channels at 16-bit uint per channel.
Definition ramCanvas.hpp:61
ramCanvas4c32b ramCanvasRGBA32b
Canvas type: 48-bit true color with alpha (RGBA) – 4 channels at 32-bit uint per channel.
Definition ramCanvas.hpp:70
ramCanvas3c16b ramCanvasRGB16b
Canvas type: 48-bit true color without alpha (RGB) – 3 channels at 16-bit uint per channel.
Definition ramCanvas.hpp:63
ramCanvasTpl< colorBGR8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvasBGR8b
colorTpl: 3 Channel @ 8-bit unsigned int channels BGR8b
ramCanvasTpl< color4c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c8b
Canvas type: generic 32-bit with 4 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:52
ramCanvasTpl< colorARGB8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvasARGB8b
colorTpl: 4 Channel @ 8-bit unsigned int channels ARGB8b
ramCanvasTpl< color4c32b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas4c32b
Canvas type: Generic 64-bit with 4 channels at 32-bit uint per channel.
Definition ramCanvas.hpp:68
ramCanvas4c64F ramCanvasRGBA64F
Canvas type: RGBA with double float channels.
ramCanvas3c64b ramCanvasRGB64b
Canvas type: 48-bit true color without alpha (RGB) – 3 channels at 64-bit uint per channel.
Definition ramCanvas.hpp:79
ramCanvasTpl< color1c64F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c64F
Canvas type: 64-bit double float grey-scale – 1 channel, 64-bit.
Definition ramCanvas.hpp:93
ramCanvasTpl< color1c32F, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas1c32F
Canvas type: 32-bit single float grey-scale – 1 channel, 32-bit.
Definition ramCanvas.hpp:92
Internal include file for ramCanvas types.