Skip to content

Commit

Permalink
Store CGContext's text position in its text matrix. (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett authored Dec 17, 2016
1 parent 447e12e commit 132ebc2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Frameworks/CoreGraphics/CGContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1235,16 +1235,19 @@ CGAffineTransform CGContextGetTextMatrix(CGContextRef context) {
*/
void CGContextSetTextPosition(CGContextRef context, CGFloat x, CGFloat y) {
NOISY_RETURN_IF_NULL(context);
UNIMPLEMENTED();
context->textMatrix.tx = x;
context->textMatrix.ty = y;
}

/**
@Status Interoperable
*/
CGPoint CGContextGetTextPosition(CGContextRef context) {
NOISY_RETURN_IF_NULL(context, StubReturn());
UNIMPLEMENTED();
return StubReturn();
return {
context->textMatrix.tx,
context->textMatrix.ty,
};
}

/**
Expand Down

0 comments on commit 132ebc2

Please sign in to comment.