Crazy Eddie's GUI System
0.8.7
BasicImage.h
1
/***********************************************************************
2
created: Wed Feb 16 2011
3
author: Paul D Turner <paul@cegui.org.uk>
4
*************************************************************************/
5
/***************************************************************************
6
* Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining
9
* a copy of this software and associated documentation files (the
10
* "Software"), to deal in the Software without restriction, including
11
* without limitation the rights to use, copy, modify, merge, publish,
12
* distribute, sublicense, and/or sell copies of the Software, and to
13
* permit persons to whom the Software is furnished to do so, subject to
14
* the following conditions:
15
*
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
* OTHER DEALINGS IN THE SOFTWARE.
26
***************************************************************************/
27
#ifndef _CEGUIBasicImage_h_
28
#define _CEGUIBasicImage_h_
29
30
#include "CEGUI/Image.h"
31
#include "CEGUI/String.h"
32
#include "CEGUI/Rect.h"
33
34
#if defined(_MSC_VER)
35
# pragma warning(push)
36
# pragma warning(disable : 4251)
37
#endif
38
39
// Start of CEGUI namespace section
40
namespace
CEGUI
41
{
42
class
CEGUIEXPORT BasicImage :
public
Image
43
{
44
public
:
45
BasicImage(
const
String& name);
46
BasicImage(
const
XMLAttributes& attributes);
47
48
BasicImage(
const
String& name, Texture* texture,
49
const
Rectf& tex_area,
const
Vector2f& offset,
50
const
AutoScaledMode
autoscaled,
const
Sizef& native_res);
51
52
void
setTexture(Texture* texture);
53
void
setArea(
const
Rectf& pixel_area);
54
void
setOffset(
const
Vector2f& pixel_offset);
55
void
setAutoScaled(
const
AutoScaledMode
autoscaled);
56
void
setNativeResolution(
const
Sizef& native_res);
57
58
// Implement CEGUI::Image interface
59
const
String& getName()
const
;
60
const
Sizef& getRenderedSize()
const
;
61
const
Vector2f& getRenderedOffset()
const
;
62
void
render(
GeometryBuffer
& buffer,
63
const
Rectf
& dest_area,
64
const
Rectf
* clip_area,
65
const
ColourRect
& colours)
const
;
66
68
// the window can adapt to the new display size accordingly
69
void
notifyDisplaySizeChanged(
const
Sizef
& renderer_display_size);
70
71
protected
:
73
void
updateScaledSizeAndOffset(
const
Sizef
& renderer_display_size);
75
void
updateScaledSize(
const
Sizef
& renderer_display_size);
77
void
updateScaledOffset(
const
Sizef
& renderer_display_size);
78
80
String
d_name;
82
Texture
* d_texture;
84
Sizef
d_pixelSize;
86
Rectf
d_area;
88
Vector2f
d_pixelOffset;
90
AutoScaledMode
d_autoScaled;
92
Sizef
d_nativeResolution;
94
Sizef
d_scaledSize;
96
Vector2f
d_scaledOffset;
97
};
98
99
}
// End of CEGUI namespace section
100
101
#if defined(_MSC_VER)
102
# pragma warning(pop)
103
#endif
104
105
#endif // end of guard _CEGUIBasicImage_h_
106
CEGUI::GeometryBuffer
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition:
GeometryBuffer.h:62
CEGUI
Main namespace for Crazy Eddie's GUI Library.
Definition:
arch_overview.dox:1
CEGUI::Vector2< float >
CEGUI::ColourRect
Class that holds details of colours for the four corners of a rectangle.
Definition:
ColourRect.h:66
CEGUI::Texture
Abstract base class specifying the required interface for Texture objects.
Definition:
Texture.h:75
CEGUI::AutoScaledMode
AutoScaledMode
Definition:
Image.h:59
CEGUI::Size< float >
CEGUI::String
String class used within the GUI system.
Definition:
String.h:83
CEGUI::Rect< float >
cegui
include
CEGUI
BasicImage.h
Generated by
1.8.16