Esempio n. 1
0
//
// Draw an image on the DynamicMap
//
void pyDynamicText::DrawImage( uint16_t x, uint16_t y, pyImage& image, bool respectAlpha )
{
    // create message
    plDynamicTextMsg* pMsg = ICreateDTMsg();
    if ( pMsg )
    {
        plKey k = image.GetKey();
        pMsg->DrawImage( x, y, k, respectAlpha);
        plgDispatch::MsgSend( pMsg );   // whoosh... off it goes
    }
}
Esempio n. 2
0
void pyVaultImageNode::Image_SetImage(pyImage& image)
{
    if (!fNode)
        return;

    if (fMipmapKey) {
        fMipmapKey->UnRefObject();
        fMipmapKey = nil;
        fMipmap = nil;
    }

    if (fMipmap = image.GetImage()) {
        VaultImageNode access(fNode);
        access.StuffImage(fMipmap);
        
        fMipmapKey = image.GetKey();
        if (!fMipmapKey)
            fMipmapKey = CreateAndRefImageKey(fNode->nodeId, fMipmap);
        else
            fMipmapKey->RefObject();
    }
}
Esempio n. 3
0
int16_t   pyGUIControlListBox::AddImageInBox( pyImage& image, uint32_t x, uint32_t y, uint32_t width, uint32_t height, bool respectAlpha )
{
    if ( fGCkey )
    {
        // get the pointer to the modifier
        pfGUIListBoxMod* plbmod = pfGUIListBoxMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
        if ( plbmod )
        {
            pfListPictureInBox *element = new pfListPictureInBox(image.GetKey(),x,y,width,height,respectAlpha);
            if( fBuildRoots.GetCount() > 0 )
                fBuildRoots[ fBuildRoots.GetCount() - 1 ]->AddChild( element );
            return plbmod->AddElement( element );
        }
    }
    return -1;
}