BitBlt () is equivalent in Objective-C / Cocoa

I made a scrolling 2D video with visual style scrolling a few years ago. I translated it to Cocoa for Mac. Is there any framework that would allow me to use BitBlt ? Or is there an equivalent to BitBlt without using OpenGL? Thanks!

+3
source share
2 answers

You should probably start with Core Graphics.

+2
source

As Matt said, you probably want CGContextDrawImageand CGContextSetBlendMode.

CGImageRef . . , , CGDataProviderCreateDirect. CGImageCreate.

, Cocoa view drawRect: : CGContextRef cgContext = [[NSGraphicsContext currentContext] graphicsPort];

CGContextDrawImage .

, CGContextSetBlendMode.

+2

Source: https://habr.com/ru/post/1721045/


All Articles