9 scale_direct(float x
, float y
, BRect area
)
11 return BPoint(area
.Width() * x
+ area
.left
, area
.Height() * y
+ area
.top
);
16 scale_direct(float x1
, float x2
, float y1
, float y2
, BRect area
)
18 return BRect(area
.Width() * x1
+ area
.left
, area
.Height() * y1
+ area
.top
,
19 area
.Width()* x2
+ area
.left
, area
.Height() * y2
+ area
.top
);
22 static const float kPositionalX
[] = { 0, 0.1, 0.25, 0.3, 0.7, 0.75, 0.9, 1.0 };
23 static const float kPositionalY
[] = { 0, 0.1, 0.7, 0.8, 0.9, 1.0 };
26 scale(int x
, int y
,BRect area
)
28 return scale_direct(kPositionalX
[x
], kPositionalY
[y
], area
);
33 scale(int x1
, int x2
, int y1
, int y2
,BRect area
)
35 return scale_direct(kPositionalX
[x1
], kPositionalX
[x2
],
36 kPositionalY
[y1
], kPositionalY
[y2
], area
);