The drawIcon:x:y:icon: method of
CgDrawable is used to draw
CgIcon objects. The following code draws the icon, created in the previous example, at the top left corner of the screen. The icon is freed because it is no longer required.
As with images, CgIcons have a platform- and device-independent data representation. However, for speed,
CgIcons are displayed using the operating system's representation of icons. On OS/2 PM the limit is 32x32 or 40x40, depending on the video driver. On Windows, the size of operating-system icons is limited to 32x32. If an icon is created larger than the maximum size on these platforms, it is clipped to the maximum size and only its top left corner is drawn.
CgIcons are displayed using only the default palette colors. It is not necessary to select a palette in the destination drawable. The
drawIcon: method ignores the selected palette.