CheckImageSize() performs a sanity check on the image vs. the base image of the control. Many images in the framework are required to be the same size. For instance, the enabled and disabled images of any control should have the same dimensions - if they don't, then the drawing will be corrupted (or rather, it would, but CheckImageSize() works around that). By default, image is compared against the class' fImage. If the image sizes do not match, then image is destroyed and recreated in a size that will match - any extra space is filled with red. If baseImage is provided, then it is used as the point of reference instead of fImage.
Definition at line 117 of file CATControl.cpp. References CAT_ERR_CONTROL_NO_IMAGE, CAT_STAT_CONTROL_IMAGE_SIZE_MISMATCH, CAT_SUCCESS, CATMin(), CATRESULTDESC, CATSUCCEEDED, CATImage::CreateImage(), CATGuiObj::fImage, CATGuiObj::fName, CATImage::Height(), CATImage::ReleaseImage(), and CATImage::Width(). Referenced by CATSwitch::Load(), CATSlider::Load(), CATProgress::Load(), and Load().
|