Mac OS Cocoa: Draw a simple pixel on a canvas

后端 未结 8 646
悲哀的现实
悲哀的现实 2021-02-02 01:21

I wish I would find an answer for this. I have searched and searched and couldn\'t the right answer. Here is my situation:

In a Mac OS Cocoa Application, I want to draw

8条回答
  •  遥遥无期
    2021-02-02 01:27

    I found your question here a bit late because I have the same problem. Perhaps Apples developer documentation can help you here. I have not tested it myself, but take a look at this document:

    http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CocoaDrawingGuide/Images/Images.html

    Roughly in the center of the document you will find the section "Creating a Bitmap". It tells you different ways of creating pixel data.

提交回复
热议问题