Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix a bug

  • Loading branch information...
commit 713ad2ed9e3fef6207f8ec80f5d9a77fd7369c0e 1 parent 4da81ba
@shichangone authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 SCGIFImageView.m
View
8 SCGIFImageView.m
@@ -124,6 +124,14 @@ - (void)loadImageData {
// Disposal Method (Operations before draw frame)
switch (frame.disposalMethod)
{
+ case 0: {
+ if (!CGRectEqualToRect(rect, frame.area)) {
+ clipRect = CGRectMake(frame.area.origin.x, size.height - frame.area.size.height - frame.area.origin.y, frame.area.size.width, frame.area.size.height);
+ // Clip Context
+ CGContextClipToRect(ctx, clipRect);
+ }
+ }
+ break;
case 1: // Do not dispose (draw over context)
// Create Rect (y inverted) to clipping
clipRect = CGRectMake(frame.area.origin.x, size.height - frame.area.size.height - frame.area.origin.y, frame.area.size.width, frame.area.size.height);

0 comments on commit 713ad2e

Please sign in to comment.
Something went wrong with that request. Please try again.