| @@ -468,7 +468,8 @@ public: | |||||
| { | { | ||||
| lowResamplingQuality = 0, /**< Just uses a nearest-neighbour algorithm for resampling. */ | lowResamplingQuality = 0, /**< Just uses a nearest-neighbour algorithm for resampling. */ | ||||
| mediumResamplingQuality = 1, /**< Uses bilinear interpolation for upsampling and area-averaging for downsampling. */ | mediumResamplingQuality = 1, /**< Uses bilinear interpolation for upsampling and area-averaging for downsampling. */ | ||||
| highResamplingQuality = 2 /**< Uses bicubic interpolation for upsampling and area-averaging for downsampling. */ | |||||
| highResamplingQuality = 2, /**< Uses bicubic interpolation for upsampling and area-averaging for downsampling. */ | |||||
| noResampling = 3 /**< No resampling is performed. */ | |||||
| }; | }; | ||||
| /** Changes the quality that will be used when resampling images. | /** Changes the quality that will be used when resampling images. | ||||
| @@ -385,9 +385,13 @@ void CoreGraphicsContext::setOpacity (float newOpacity) | |||||
| void CoreGraphicsContext::setInterpolationQuality (Graphics::ResamplingQuality quality) | void CoreGraphicsContext::setInterpolationQuality (Graphics::ResamplingQuality quality) | ||||
| { | { | ||||
| CGContextSetInterpolationQuality (context, quality == Graphics::lowResamplingQuality | |||||
| ? kCGInterpolationLow | |||||
| : kCGInterpolationHigh); | |||||
| switch (quality) | |||||
| { | |||||
| case Graphics::lowResamplingQuality: CGContextSetInterpolationQuality (context, kCGInterpolationLow); return; | |||||
| case Graphics::highResamplingQuality: CGContextSetInterpolationQuality (context, kCGInterpolationHigh); return; | |||||
| case Graphics::noResampling: CGContextSetInterpolationQuality (context, kCGInterpolationNone); return; | |||||
| default: return; | |||||
| } | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||