Color wheel: Difference between revisions
Content deleted Content added
Line 390:
void local fn BuildWindow
CGRect r = fn CGRectMake( 0, 0, 400, 400 )
window _window, @"ColorWheel", r, NSWindowStyleMaskTitled + NSWindowStyleMaskClosable
Line 401 ⟶ 399:
local fn CIImageToImageRef( ciImage as CIImageRef ) as ImageRef
CIImageRepRef rep = fn CIImageRepWithCIImage( ciImage )
CGSize size = fn ImageRepSize( rep )
Line 410 ⟶ 407:
local fn ColorWheelImage( colorSpace as CGColorSpaceRef, dither as CFNumberRef, radius as CFNumberRef, softness as CFNumberRef, lightness as CFNumberRef ) as CIImageRef
CIFilterRef filter = fn CIFilterWithName( @"CIHueSaturationValueGradient" )
ObjectSetValueForkey( filter, colorSpace, @"inputColorSpace" )
Line 422 ⟶ 418:
local fn BuildColorWheel
CIImageRef colorWheelCIImage = fn ColorWheelImage( fn CGColorSpaceCreateDeviceRGB, @0, @160, @0, @1 )
ImageRef colorWheelImage = fn CIImageToImageRef( colorWheelCIImage )
|