187::ExceptionCode
AOI_Renderer::Setup(
const aur::ACPL::FileSpec& profilePath,
const aur::ACPL::StringList& extraChannels, int32_t bytesPerComponent,
void* banddata, int32_t w, int32_t h,
bool alpha,
bool shape )
189 if( mDocument->mUseSimpleRenderer )
191 delete mSimpleRenderer;
192 mSimpleRenderer = NULL;
194 mSimpleRenderer =
new AOI_TIFFRenderer( *mDocument );
198 if( mRenderer && mRenderer->mBytesPerComponent != bytesPerComponent )
203 if( mRenderer == NULL )
205 mRenderer =
new Renderer( bytesPerComponent );
206 mDocument->mDocument->SetRenderer( mRenderer );
214 mRenderer->Setup( profilePath, extraChannels, w, h, alpha, shape,
false );
215 mRenderer->RenderPartPrepare( (uint8_t*)banddata, w, h );
219 mSimpleRenderer->Setup( profilePath, extraChannels, banddata, w, h, alpha );
222 catch( aur::ExceptionCode err )
227 delete mSimpleRenderer;
228 mSimpleRenderer = NULL;
269 mDocument->mDocument->Invalidate( (
const FRectangle&)docRect );
271 mRenderer->RenderObject( mDocument->mDocument,
reinterpret_cast<PDF::ObjectPtr
>( toRenderObj ),
true, NULL );
272 mRenderer->RenderDocument( mDocument->mDocument,
true,
false, NULL, mDocument->mDocument->GetCurrentPage() );
274 else if( mSimpleRenderer )
275 mSimpleRenderer->Render();
ExceptionCode Setup(const aur::ACPL::FileSpec &profilePath, const aur::ACPL::StringList &extraChannels, int32_t bytesPerComponent, void *banddata, int32_t w, int32_t h, bool alpha, bool shape=false)