Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions GeekGameBoard-iPhone.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -385,8 +385,11 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "GeekGameBoard-iPhone" */;
compatibilityVersion = "Xcode 3.1";
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
Expand Down Expand Up @@ -511,13 +514,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Jens Alfke";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
Expand All @@ -529,13 +541,22 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Jens Alfke";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = iphoneos;
Expand Down
15 changes: 8 additions & 7 deletions Source/GGBTextLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ - (void)drawInContext:(CGContextRef)ctx
if( _foregroundColor )
CGContextSetFillColorWithColor(ctx, _foregroundColor);

UITextAlignment align;
NSTextAlignment align;
if( [_alignmentMode isEqualToString: @"center"] )
align = NSTextAlignmentCenter;
else if( [_alignmentMode isEqualToString: @"right"] )
Expand All @@ -147,13 +147,14 @@ - (void)drawInContext:(CGContextRef)ctx
align = NSTextAlignmentLeft;

CGRect bounds = self.bounds;
//float ascender=_font.ascender, descender=_font.descender, leading=_font.leading;
//bounds.size.height -= ascender-descender - leading;

[_string drawInRect: bounds
withFont: _font
lineBreakMode: NSLineBreakByClipping
alignment: align];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.lineBreakMode = NSLineBreakByClipping;
paragraphStyle.alignment = align;

NSDictionary *dictionary = @{NSFontAttributeName:_font, NSParagraphStyleAttributeName:paragraphStyle};

[_string drawInRect:bounds withAttributes:dictionary];

UIGraphicsPopContext();
CGContextRestoreGState(ctx);
Expand Down
2 changes: 1 addition & 1 deletion Source/QuartzUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ float GetPixelAlpha( CGImageRef image, CGSize imageSize, CGPoint pt )
sTinyContext = CGBitmapContextCreate(sPixel, 1, 1,
8, 1, // bpp, rowBytes
NULL,
kCGImageAlphaOnly);
(CGBitmapInfo)kCGImageAlphaOnly);
CGContextSetBlendMode(sTinyContext, kCGBlendModeCopy);
}

Expand Down