My favorites
▼
|
Sign in
upp-mirror
U++ is the C++ development platform
Project Home
Downloads
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
reference
/
Framebuffer
/
Util.cpp
r5017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_FB
NAMESPACE_UPP
/*
static void sRenderLine(SystemDraw& w, int x, int y, int dx, int dy, int cx, int cy, int len, byte pattern)
{
DLOG(len);
for(int i = 0; i < len; i++)
if((128 >> (i & 7)) & pattern)
w.DrawRect(x + dx * i, y + dy * i, cx, cy, Black);
DDUMP("~sRenderLine");
}
static void sRenderRect(SystemDraw& w, const Rect& r, int n, byte pattern)
{
sRenderLine(w, r.left, r.top, 1, 0, 1, n, r.GetWidth(), pattern);
sRenderLine(w, r.left, r.bottom - 1, 1, 0, 1, n, r.GetWidth(), pattern);
sRenderLine(w, r.left, r.top, 0, 1, n, 1, r.GetHeight(), pattern);
sRenderLine(w, r.right - 1, r.top, 0, 1, n, 1, r.GetHeight(), pattern);
}
void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2,
const Rect& clip, int n, Color color, uint64 pattern)
{
DLOG("@ DrawDragRect " << rect1 << " " << rect2 << ", clip: " << clip << ", pattern: " << pattern);
TIMING("DrawDrawRect");
w.Clip(clip);
w.Invert();
sRenderRect(w, rect1, n, (byte)pattern);
sRenderRect(w, rect2, n, (byte)pattern);
Ctrl::AddUpdate((rect1 | rect2).Offseted(w.GetOffset()));
// MemoryProfile mem;
// DDUMP(mem);
w.End();
}
static uint64 sGetAniPat(uint64 src, int pos)
{
uint64 out = 0;
pos &= 7;
for(int i = 8; --i >= 0;) {
byte sr = (byte)(src >> (8 * ((7 - i - pos) & 7)));
out = (out << 8) | (byte)((sr | (sr << 8)) >> pos);
}
return out;
}
*/
/*
Size GetScreenSize()
{
return ScreenInfo().GetPageSize();
}
*/
void DrawDragRect(Ctrl& q, const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, int type, int animation)
{
q.DragRectDraw(rect1, rect2, clip, n, color, type, animation);
}
END_UPP_NAMESPACE
#endif
Show details
Hide details
Change log
r4176
by cxl on Nov 16, 2011
Diff
.reference: Rainbow example (RM #158)
Go to:
/trunk/reference/Framebuffer
...nk/reference/Framebuffer/After.h
...erence/Framebuffer/ChSysInit.cpp
...k/reference/Framebuffer/Clip.cpp
...k/reference/Framebuffer/Ctrl.cpp
/trunk/reference/Framebuffer/Ctrl.h
...nk/reference/Framebuffer/DnD.cpp
...k/reference/Framebuffer/Draw.cpp
.../reference/Framebuffer/Event.cpp
/trunk/reference/Framebuffer/FB.iml
/trunk/reference/Framebuffer/Fb.h
...erence/Framebuffer/Framebuffer.h
...ence/Framebuffer/Framebuffer.upp
/trunk/reference/Framebuffer/Gui.h
.../reference/Framebuffer/Image.cpp
...nk/reference/Framebuffer/Top.cpp
/trunk/reference/Framebuffer/Top.h
...ference/Framebuffer/TopFrame.cpp
...k/reference/Framebuffer/Util.cpp
...nk/reference/Framebuffer/Wnd.cpp
/trunk/reference/Framebuffer/init
/trunk/reference/LinuxFb
/trunk/reference/LinuxFb/Keys.h
/trunk/reference/LinuxFb/LinuxFb.h
...nk/reference/LinuxFb/LinuxFb.upp
...reference/LinuxFb/LinuxFbLocal.h
/trunk/reference/LinuxFb/Local.h
/trunk/reference/LinuxFb/Proc.cpp
/trunk/reference/LinuxFb/Win.cpp
/trunk/reference/LinuxFb/init
/trunk/reference/LinuxFb/keymap.cpp
.../reference/LinuxFb/vgakeyboard.h
/trunk/reference/UWord_FB
/trunk/reference/UWord_FB/UWord.cpp
/trunk/reference/UWord_FB/UWord.iml
.../reference/UWord_FB/UWord_FB.upp
/trunk/reference/UWord_FB/icon.ico
/trunk/reference/UWord_FB/init
/trunk/reference/WinFb
/trunk/reference/WinFb/Keys.h
/trunk/reference/WinFb/Local.h
/trunk/reference/WinFb/Proc.cpp
/trunk/reference/WinFb/Win.cpp
/trunk/reference/WinFb/WinFb.h
/trunk/reference/WinFb/WinFb.upp
/trunk/reference/WinFb/init
/trunk/reference/guiplatform.h
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1804 bytes, 71 lines
View raw file
Powered by
Google Project Hosting