Nux

Merge lp:~unity-team/nux/nux.coverflow-export-width into lp:nux/2.0

Proposed by Jason Smith
Status: Merged
Approved by: Jason Smith
Approved revision: 567
Merged at revision: 567
Proposed branch: lp:~unity-team/nux/nux.coverflow-export-width
Merge into: lp:nux/2.0
Diff against target: 51 lines (+20/-1)
3 files modified
Nux/Coverflow.cpp (+16/-0)
Nux/Coverflow.h (+3/-0)
configure.ac (+1/-1)
To merge this branch: bzr merge lp:~unity-team/nux/nux.coverflow-export-width
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve
Review via email: mp+92691@code.launchpad.net

Description of the change

Exports the viewport width

To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/Coverflow.cpp'
2--- Nux/Coverflow.cpp 2012-02-11 16:12:18 +0000
3+++ Nux/Coverflow.cpp 2012-02-12 22:49:53 +0000
4@@ -1241,4 +1241,20 @@
5 return true;
6 }
7
8+ float Coverflow::ViewportWidthAtDepth(float depth)
9+ {
10+ nux::Point2 top_left;
11+ nux::Point2 bottom_right;
12+ pimpl->Get3DBoundingBox(pimpl->camera_position_.z + depth, top_left, bottom_right);
13+ return bottom_right.x - top_left.x;
14+ }
15+
16+ float Coverflow::ViewportHeightAtDepth(float depth)
17+ {
18+ nux::Point2 top_left;
19+ nux::Point2 bottom_right;
20+ pimpl->Get3DBoundingBox(pimpl->camera_position_.z + depth, top_left, bottom_right);
21+ return top_left.y - bottom_right.y;
22+ }
23+
24 } // namespace nux
25
26=== modified file 'Nux/Coverflow.h'
27--- Nux/Coverflow.h 2012-02-11 06:11:29 +0000
28+++ Nux/Coverflow.h 2012-02-12 22:49:53 +0000
29@@ -82,6 +82,9 @@
30 bool AcceptKeyNavFocus();
31
32 void SetCameraDistance(float distance);
33+
34+ float ViewportWidthAtDepth(float depth);
35+ float ViewportHeightAtDepth(float depth);
36 protected:
37 virtual bool InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character);
38 virtual void ClientDraw(nux::GraphicsEngine& graphics_engine, nux::DrawAreaContext &ctx, bool force_draw);
39
40=== modified file 'configure.ac'
41--- configure.ac 2012-02-12 22:25:19 +0000
42+++ configure.ac 2012-02-12 22:49:53 +0000
43@@ -22,7 +22,7 @@
44 # The number format is : year/month/day
45 # e.g.: december 5th, 2011 is: 20111205
46 # To make more than one API change in a day, add a number to the date. Like 20111205.xx
47-m4_define([nux_abi_version], [20120211.01])
48+m4_define([nux_abi_version], [20120212.01])
49
50 m4_define([nux_version],
51 [nux_major_version.nux_minor_version.nux_micro_version])

Subscribers

People subscribed via source and target branches

to all changes: