modules/graphics/src/main/native-glass/mac/GlassView2D.m
Print this page
*** 370,380 ****
CGContextFlush(cgContext);
}
CGContextRestoreGState(cgContext);
}
! - (void)pushPixels:(void*)pixels withWidth:(GLuint)width withHeight:(GLuint)height withScale:(GLfloat)scale withEnv:(JNIEnv *)env
{
assert([NSGraphicsContext currentContext] != nil);
CGContextRef cgContext = [[NSGraphicsContext currentContext] graphicsPort];
{
--- 370,380 ----
CGContextFlush(cgContext);
}
CGContextRestoreGState(cgContext);
}
! - (void)pushPixels:(void*)pixels withWidth:(GLuint)width withHeight:(GLuint)height withScaleX:(GLfloat)scalex withScaleY:(GLfloat)scaley withEnv:(JNIEnv *)env
{
assert([NSGraphicsContext currentContext] != nil);
CGContextRef cgContext = [[NSGraphicsContext currentContext] graphicsPort];
{
*** 395,405 ****
CGContextSaveGState(cgContext);
{
CGContextTranslateCTM(cgContext, 0, size.height);
CGContextScaleCTM(cgContext, 1, -1);
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
! CGContextDrawImage(cgContext, CGRectMake(0, 0, width/scale, height/scale), cgImage);
}
CGContextRestoreGState(cgContext);
}
CGImageRelease(cgImage);
}
--- 395,405 ----
CGContextSaveGState(cgContext);
{
CGContextTranslateCTM(cgContext, 0, size.height);
CGContextScaleCTM(cgContext, 1, -1);
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
! CGContextDrawImage(cgContext, CGRectMake(0, 0, width/scalex, height/scaley), cgImage);
}
CGContextRestoreGState(cgContext);
}
CGImageRelease(cgImage);
}