mirror of
https://github.com/darlinghq/darling-coregraphics.git
synced 2024-11-23 04:09:42 +00:00
Oapl: Add OPContextGetAlpha
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/opal/trunk@37181 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b5b4afdc87
commit
8269adcc02
@ -1,3 +1,8 @@
|
||||
2013-10-01 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Headers/CoreGraphics/CGContext.h:
|
||||
* Source/OpalGraphics/CGContext.m: Add OPContextGetAlpha
|
||||
|
||||
2013-09-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/OpalGraphics/CGBitmapContext.m:
|
||||
|
@ -555,6 +555,8 @@ CGRect CGContextConvertRectToUserSpace(CGContextRef ctx, CGRect rect);
|
||||
|
||||
// FIXME: Move extensions to a separate header?
|
||||
|
||||
CGFloat OPContextGetAlpha(CGContextRef ctx);
|
||||
|
||||
void OPContextSetScaleFactor(CGContextRef ctx, CGFloat scale);
|
||||
|
||||
void OPContextSetSize(CGContextRef ctx, CGSize size);
|
||||
|
@ -1055,6 +1055,26 @@ void CGContextClipToMask(CGContextRef ctx, CGRect rect, CGImageRef mask)
|
||||
OPRESTORELOGGING()
|
||||
}
|
||||
|
||||
CGFloat OPContextGetAlpha(CGContextRef ctx)
|
||||
{
|
||||
OPLOGCALL("ctx /*%p*/", ctx)
|
||||
|
||||
if(!ctx || !ctx->add)
|
||||
{
|
||||
NSLog(@"null %s%s%s in %s",
|
||||
!ctx ? "ctx" : "",
|
||||
(!ctx && !ctx->add) ? " and " : "",
|
||||
!ctx->add ? "ctx->add" : "",
|
||||
__PRETTY_FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CGFloat result = ctx->add->alpha;
|
||||
|
||||
OPRESTORELOGGING()
|
||||
return result;
|
||||
}
|
||||
|
||||
void OPContextResetClip(CGContextRef ctx)
|
||||
{
|
||||
OPLOGCALL("ctx /*%p*/", ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user