forked from card-io/card.io-dmz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmz_constants.h
29 lines (20 loc) · 1.19 KB
/
dmz_constants.h
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
// See the file "LICENSE.md" for the full license governing this code.
#ifndef DMZ_CONSTANTS_H
#define DMZ_CONSTANTS_H
#define kCreditCardTargetWidth 428
#define kCreditCardTargetHeight 270
#define kPortraitSampleWidth 480
#define kPortraitSampleHeight 640
#define kNumberWidth 19
#define kNumberHeight 27
#define kPortraitVerticalInset ((kPortraitSampleHeight - kCreditCardTargetHeight) / 2)
#define kPortraitVerticalPercentInset ((float)kPortraitVerticalInset / (float)kPortraitSampleHeight)
#define kPortraitHorizontalInset ((kPortraitSampleWidth - kCreditCardTargetWidth) / 2)
#define kPortraitHorizontalPercentInset ((float)kPortraitHorizontalInset / (float)kPortraitSampleWidth)
#define kLandscapeSampleWidth kPortraitSampleHeight
#define kLandscapeSampleHeight kPortraitSampleWidth
#define kLandscapeVerticalInset ((kLandscapeSampleHeight - kCreditCardTargetHeight) / 2)
#define kLandscapeVerticalPercentInset ((float)kLandscapeVerticalInset / (float)kLandscapeSampleHeight)
#define kLandscapeHorizontalInset ((kLandscapeSampleWidth - kCreditCardTargetWidth) / 2)
#define kLandscapeHorizontalPercentInset ((float)kLandscapeHorizontalInset / (float)kLandscapeSampleWidth)
#endif // DMZ_CONSTANTS_H