Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Image fixes #636

Merged
merged 9 commits into from
Jul 25, 2016
5 changes: 1 addition & 4 deletions Frameworks/CoreGraphics/CGContext.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//******************************************************************************
//
// Copyright (c) 2016 Intel Corporation. All rights reserved.
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
Expand Down Expand Up @@ -70,10 +71,6 @@ - (void)dealloc {
delete _backing;
}

CGContextImpl* __CGContext::Backing() {
return _backing;
}

/**
@Status Interoperable
*/
Expand Down
9 changes: 5 additions & 4 deletions Frameworks/CoreGraphics/CGContextCairo.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//******************************************************************************
//
// Copyright (c) 2016 Intel Corporation. All rights reserved.
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
Expand Down Expand Up @@ -325,7 +326,7 @@
cairo_new_path(_drawContext);
cairo_rectangle(_drawContext, 0, 0, dest.size.width, dest.size.height);
cairo_clip(_drawContext);
cairo_paint(_drawContext);
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);

cairo_restore(_drawContext);
cairo_new_path(_drawContext);
Expand Down Expand Up @@ -375,7 +376,7 @@
cairo_clip(_drawContext);

if (curState->_imgMask == NULL) {
cairo_paint(_drawContext);
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
} else {
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
Expand Down Expand Up @@ -1420,7 +1421,7 @@
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
} else {
cairo_paint(_drawContext);
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
}
cairo_pattern_destroy(pattern);
UNLOCK_CAIRO();
Expand Down Expand Up @@ -1461,7 +1462,7 @@
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
} else {
cairo_paint(_drawContext);
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
}
cairo_pattern_destroy(pattern);
UNLOCK_CAIRO();
Expand Down
Loading