2013-12-30 00:21:53 +00:00
|
|
|
/*
|
|
|
|
* \brief Functor for drawing an icon onto a surface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2005-10-24
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2006-2017 Genode Labs GmbH
|
2013-12-30 00:21:53 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2013-12-30 00:21:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__SCOUT_GFX__ICON_PAINTER_H_
|
|
|
|
#define _INCLUDE__SCOUT_GFX__ICON_PAINTER_H_
|
|
|
|
|
|
|
|
#include <os/texture.h>
|
|
|
|
|
|
|
|
class Icon_painter
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An Icon has the following layout:
|
|
|
|
*
|
|
|
|
* P1---+--------+----+
|
|
|
|
* | cs | hs | cs | top row
|
|
|
|
* +----P2-------+----+
|
|
|
|
* | | | |
|
|
|
|
* | vs | | vs | mid row
|
|
|
|
* | | | |
|
|
|
|
* +----+--------P3---+
|
|
|
|
* | cs | hs | cs | low row
|
|
|
|
* +------------------P4
|
|
|
|
*
|
|
|
|
* cs ... corner slice
|
|
|
|
* hs ... horizontal slice
|
|
|
|
* vs ... vertical slice
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw corner slice
|
|
|
|
*/
|
2014-09-12 18:25:53 +00:00
|
|
|
template <typename SPT, typename TPT>
|
|
|
|
static void _draw_cslice(TPT const *src, unsigned char const *src_a,
|
|
|
|
unsigned src_pitch, int alpha, SPT *dst,
|
2013-12-30 00:21:53 +00:00
|
|
|
unsigned dst_pitch, int w, int h)
|
|
|
|
{
|
|
|
|
for (int j = 0; j < h; j++) {
|
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
TPT const *s = src;
|
2013-12-30 00:21:53 +00:00
|
|
|
unsigned char const *sa = src_a;
|
2014-09-12 18:25:53 +00:00
|
|
|
SPT *d = dst;
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
for (int i = 0; i < w; i++, s++, sa++, d++)
|
2019-03-09 16:31:31 +00:00
|
|
|
SPT::transfer(*s, *sa, alpha, *d);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
src += src_pitch, src_a += src_pitch, dst += dst_pitch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw horizontal slice
|
|
|
|
*/
|
2014-09-12 18:25:53 +00:00
|
|
|
template <typename SPT, typename TPT>
|
|
|
|
static void _draw_hslice(TPT const *src, unsigned char const *src_a,
|
|
|
|
int src_pitch, int alpha, SPT *dst,
|
2013-12-30 00:21:53 +00:00
|
|
|
int dst_pitch, int w, int h)
|
|
|
|
{
|
|
|
|
for (int j = 0; j < h; j++) {
|
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
TPT s = *src;
|
2013-12-30 00:21:53 +00:00
|
|
|
int sa = *src_a;
|
2014-09-12 18:25:53 +00:00
|
|
|
SPT *d = dst;
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
for (int i = 0; i < w; i++, d++)
|
2019-03-09 16:31:31 +00:00
|
|
|
SPT::transfer(s, sa, alpha, *d);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
src += src_pitch, src_a += src_pitch, dst += dst_pitch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw vertical slice
|
|
|
|
*/
|
2014-09-12 18:25:53 +00:00
|
|
|
template <typename SPT, typename TPT>
|
|
|
|
static void _draw_vslice(TPT const *src, unsigned char const *src_a,
|
Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:
* A class with virtual functions can no longer publicly inherit base
classed without a vtable. The inherited object may either be moved
to a member variable, or inherited privately. The latter would be
used for classes that inherit 'List::Element' or 'Avl_node'. In order
to enable the 'List' and 'Avl_tree' to access the meta data, the
'List' must become a friend.
* Instead of adding a virtual destructor to abstract base classes,
we inherit the new 'Interface' class, which contains a virtual
destructor. This way, single-line abstract base classes can stay
as compact as they are now. The 'Interface' utility resides in
base/include/util/interface.h.
* With the new warnings enabled, all member variables must be explicitly
initialized. Basic types may be initialized with '='. All other types
are initialized with braces '{ ... }' or as class initializers. If
basic types and non-basic types appear in a row, it is nice to only
use the brace syntax (also for basic types) and align the braces.
* If a class contains pointers as members, it must now also provide a
copy constructor and assignment operator. In the most cases, one
would make them private, effectively disallowing the objects to be
copied. Unfortunately, this warning cannot be fixed be inheriting
our existing 'Noncopyable' class (the compiler fails to detect that
the inheriting class cannot be copied and still gives the error).
For now, we have to manually add declarations for both the copy
constructor and assignment operator as private class members. Those
declarations should be prepended with a comment like this:
/*
* Noncopyable
*/
Thread(Thread const &);
Thread &operator = (Thread const &);
In the future, we should revisit these places and try to replace
the pointers with references. In the presence of at least one
reference member, the compiler would no longer implicitly generate
a copy constructor. So we could remove the manual declaration.
Issue #465
2017-12-21 14:42:15 +00:00
|
|
|
int /* src_pitch */, int alpha, SPT *dst,
|
|
|
|
int dst_pitch, int w, int h)
|
2013-12-30 00:21:53 +00:00
|
|
|
{
|
|
|
|
for (int i = 0; i < w; i++) {
|
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
TPT s = *src;
|
2013-12-30 00:21:53 +00:00
|
|
|
int sa = *src_a;
|
2014-09-12 18:25:53 +00:00
|
|
|
SPT *d = dst;
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
for (int j = 0; j < h; j++, d += dst_pitch)
|
2019-03-09 16:31:31 +00:00
|
|
|
SPT::transfer(s, sa, alpha, *d);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
src += 1, src_a += 1, dst += 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw center slice
|
|
|
|
*/
|
2014-09-12 18:25:53 +00:00
|
|
|
template <typename SPT, typename TPT>
|
|
|
|
static void _draw_center(TPT const *src, unsigned char const *src_a,
|
Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:
* A class with virtual functions can no longer publicly inherit base
classed without a vtable. The inherited object may either be moved
to a member variable, or inherited privately. The latter would be
used for classes that inherit 'List::Element' or 'Avl_node'. In order
to enable the 'List' and 'Avl_tree' to access the meta data, the
'List' must become a friend.
* Instead of adding a virtual destructor to abstract base classes,
we inherit the new 'Interface' class, which contains a virtual
destructor. This way, single-line abstract base classes can stay
as compact as they are now. The 'Interface' utility resides in
base/include/util/interface.h.
* With the new warnings enabled, all member variables must be explicitly
initialized. Basic types may be initialized with '='. All other types
are initialized with braces '{ ... }' or as class initializers. If
basic types and non-basic types appear in a row, it is nice to only
use the brace syntax (also for basic types) and align the braces.
* If a class contains pointers as members, it must now also provide a
copy constructor and assignment operator. In the most cases, one
would make them private, effectively disallowing the objects to be
copied. Unfortunately, this warning cannot be fixed be inheriting
our existing 'Noncopyable' class (the compiler fails to detect that
the inheriting class cannot be copied and still gives the error).
For now, we have to manually add declarations for both the copy
constructor and assignment operator as private class members. Those
declarations should be prepended with a comment like this:
/*
* Noncopyable
*/
Thread(Thread const &);
Thread &operator = (Thread const &);
In the future, we should revisit these places and try to replace
the pointers with references. In the presence of at least one
reference member, the compiler would no longer implicitly generate
a copy constructor. So we could remove the manual declaration.
Issue #465
2017-12-21 14:42:15 +00:00
|
|
|
int /* src_pitch */, int alpha, SPT *dst,
|
|
|
|
int dst_pitch, int w, int h)
|
2013-12-30 00:21:53 +00:00
|
|
|
{
|
2014-09-12 18:25:53 +00:00
|
|
|
TPT s = *src;
|
2013-12-30 00:21:53 +00:00
|
|
|
int sa = *src_a;
|
|
|
|
|
|
|
|
for (int j = 0; j < h; j++, dst += dst_pitch) {
|
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
SPT *d = dst;
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
for (int i = 0; i < w; i++, d++)
|
2019-03-09 16:31:31 +00:00
|
|
|
SPT::transfer(s, sa, alpha, *d);
|
2013-12-30 00:21:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clip rectangle against clipping region
|
|
|
|
*
|
|
|
|
* The out parameters are the resulting x/y offsets and the
|
|
|
|
* visible width and height.
|
|
|
|
*
|
|
|
|
* \return 1 if rectangle intersects with clipping region,
|
|
|
|
* 0 otherwise
|
|
|
|
*/
|
|
|
|
static inline int _clip(int px1, int py1, int px2, int py2,
|
|
|
|
int cx1, int cy1, int cx2, int cy2,
|
|
|
|
int *out_x, int *out_y, int *out_w, int *out_h)
|
|
|
|
{
|
|
|
|
/* determine intersection of rectangle and clipping region */
|
|
|
|
int x1 = Genode::max(px1, cx1);
|
|
|
|
int y1 = Genode::max(py1, cy1);
|
|
|
|
int x2 = Genode::min(px2, cx2);
|
|
|
|
int y2 = Genode::min(py2, cy2);
|
|
|
|
|
|
|
|
*out_w = x2 - x1 + 1;
|
|
|
|
*out_h = y2 - y1 + 1;
|
|
|
|
*out_x = x1 - px1;
|
|
|
|
*out_y = y1 - py1;
|
|
|
|
|
|
|
|
return (*out_w > 0) && (*out_h > 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef Genode::Surface_base::Area Area;
|
|
|
|
typedef Genode::Surface_base::Rect Rect;
|
|
|
|
|
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
template <typename SPT, typename TPT>
|
|
|
|
static inline void paint(Genode::Surface<SPT> &surface, Rect rect,
|
|
|
|
Genode::Texture<TPT> const &icon, unsigned alpha)
|
2013-12-30 00:21:53 +00:00
|
|
|
{
|
2014-09-12 18:25:53 +00:00
|
|
|
SPT *addr = surface.addr();
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (!addr || (alpha == 0)) return;
|
|
|
|
|
|
|
|
int const cx1 = surface.clip().x1();
|
|
|
|
int const cy1 = surface.clip().y1();
|
|
|
|
int const cx2 = surface.clip().x2();
|
|
|
|
int const cy2 = surface.clip().y2();
|
|
|
|
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
unsigned const icon_w = icon.size().w,
|
|
|
|
icon_h = icon.size().h;
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
/* determine point positions */
|
|
|
|
int const x1 = rect.x1();
|
|
|
|
int const y1 = rect.y1();
|
|
|
|
int const x4 = x1 + rect.w() - 1;
|
|
|
|
int const y4 = y1 + rect.h() - 1;
|
|
|
|
int const x2 = x1 + icon_w/2;
|
|
|
|
int const y2 = y1 + icon_h/2;
|
2015-11-12 17:21:27 +00:00
|
|
|
int const x3 = Genode::max(x4 - (int)icon_w/2 + 1, x2);
|
|
|
|
int const y3 = Genode::max(y4 - (int)icon_h/2 + 1, y2);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
int const tx1 = 0;
|
|
|
|
int const ty1 = 0;
|
|
|
|
int const tx4 = icon_w - 1;
|
|
|
|
int const ty4 = icon_h - 1;
|
|
|
|
int const tx2 = icon_w/2;
|
|
|
|
int const ty2 = icon_h/2;
|
2015-11-12 17:21:27 +00:00
|
|
|
int const tx3 = Genode::max(tx4 - (int)icon_w/2 + 1, tx2);
|
|
|
|
int const ty3 = Genode::max(ty4 - (int)icon_h/2 + 1, ty2);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
2014-09-12 18:25:53 +00:00
|
|
|
TPT const *src = icon.pixel() + icon_w*ty1;
|
2013-12-30 00:21:53 +00:00
|
|
|
unsigned char const *src_a = icon.alpha() + icon_w*ty1;
|
|
|
|
int dx, dy, w, h;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* top row
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (_clip(x1, y1, x2 - 1, y2 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_cslice(src + tx1 + dy*icon_w + dx, src_a + tx1 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y1 + dy)*surface.size().w + x1 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x2, y1, x3 - 1, y2 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_hslice(src + tx2 + dy*icon_w + dx, src_a + tx2 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y1 + dy)*surface.size().w + x2 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x3, y1, x4, y2 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_cslice(src + tx3 + dy*icon_w + dx, src_a + tx3 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y1 + dy)*surface.size().w + x3 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* mid row
|
|
|
|
*/
|
|
|
|
|
|
|
|
src = icon.pixel() + icon_w*ty2;
|
|
|
|
src_a = icon.alpha() + icon_w*ty2;
|
|
|
|
|
|
|
|
if (_clip(x1, y2, x2 - 1, y3 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_vslice(src + tx1 + dx, src_a + tx1 + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y2 + dy)*surface.size().w + x1 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x2, y2, x3 - 1, y3 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_center(src + tx2, src_a + tx2, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y2 + dy)*surface.size().w + x2 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x3, y2, x4, y3 - 1, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_vslice(src + tx3 + dx, src_a + tx3 + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y2 + dy)*surface.size().w + x3 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* low row
|
|
|
|
*/
|
|
|
|
|
|
|
|
src = icon.pixel() + icon_w*ty3;
|
|
|
|
src_a = icon.alpha() + icon_w*ty3;
|
|
|
|
|
|
|
|
if (_clip(x1, y3, x2 - 1, y4, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_cslice(src + tx1 + dy*icon_w + dx, src_a + tx1 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y3 + dy)*surface.size().w + x1 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x2, y3, x3 - 1, y4, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_hslice(src + tx2 + dy*icon_w + dx, src_a + tx2 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y3 + dy)*surface.size().w + x2 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
|
|
|
|
if (_clip(x3, y3, x4, y4, cx1, cy1, cx2, cy2, &dx, &dy, &w, &h))
|
|
|
|
_draw_cslice(src + tx3 + dy*icon_w + dx, src_a + tx3 + dy*icon_w + dx, icon_w, alpha,
|
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types
like 'Affinity' down the road.
- Represent 'Rect' as typle of point and area, which is the most
common form of initialization, creates in valid 'Rect' by default.
- Turn Point, Area, and Rect into compound types, making x, y, w, h, at,
area accessible without a method call
- 'Rect::Compound' function for constructing a 'Rect' from two points,
replacing a former constructor
- Use result type 'Rect::Cut_remainder' instead of out parameters.
Fixes #5239
2024-06-05 10:40:13 +00:00
|
|
|
addr + (y3 + dy)*surface.size().w + x3 + dx, surface.size().w, w, h);
|
2013-12-30 00:21:53 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__SCOUT_GFX__ICON_PAINTER_H_ */
|