![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The FContext class provides a monolithic context for calling image raster and composition functions for a given format. More...
Public Member Functions | |
FContext (const FContext &)=delete | |
FContext (FCommandQueue &iQueue, eFormat iFormat, ePerformanceIntent iPerfIntent=ePerformanceIntent::PerformanceIntent_Max) | |
~FContext () | |
ulError | AccumulateSample (const FBlock &iBlock, FColor *oColor, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | AlphaBlend (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | AlphaBlendAA (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const FVec2F &iPosition=FVec2F(0.f, 0.f), ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | AnalyzeSmallestVisibleRect (const FBlock &iBlock, FRectI *oRect, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Blend (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eBlendMode iBlendingMode=Blend_Normal, eAlphaMode iAlphaMode=Alpha_Normal, ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BlendAA (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const FVec2F &iPosition=FVec2F(0.f, 0.f), eBlendMode iBlendingMode=Blend_Normal, eAlphaMode iAlphaMode=Alpha_Normal, ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BlendBucket (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const TArray< FVec2I > &iPosition=TArray< FVec2I >(1), eBlendMode iBlendingMode=Blend_Normal, eAlphaMode iAlphaMode=Alpha_Normal, ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BlendColor (const ISample &iColor, FBlock &iBackdrop, const FRectI &iBackdropRect=FRectI::Auto, eBlendMode iBlendingMode=Blend_Normal, eAlphaMode iAlphaMode=Alpha_Normal, ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BlendTiled (const FBlock &iSource, FBlock &iBackdrop, const FRectI &iSourceRect=FRectI::Auto, const FRectI &iBackdropRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eBlendMode iBlendingMode=Blend_Normal, eAlphaMode iAlphaMode=Alpha_Normal, ufloat iOpacity=1.0f, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BrownianNoise (FBlock &iBlock, float iFrequency=0.22f, float iFrequencyMult=1.8f, float iAmplitudeMult=0.35f, uint8 iNumLayers=5, int iSeed=-1, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BuildPremultipliedSummedAreaTable (const FBlock &iSource, FBlock &iDestination, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | BuildSummedAreaTable (const FBlock &iSource, FBlock &iDestination, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Clear (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Clouds (FBlock &iBlock, int iSeed=-1, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvertFormat (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Convolve (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvolveMax (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvolveMin (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvolvePremult (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvolvePremultMax (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ConvolvePremultMin (const FBlock &iSource, FBlock &iDestination, const FKernel &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Copy (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawArc (FBlock &iBlock, const FVec2I &iCenter, const int iRadius, const int iStartDegree, const int iEndDegree, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawArcAA (FBlock &iBlock, const FVec2I &iCenter, const int iRadius, const int iStartDegree, const int iEndDegree, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawArcSP (FBlock &iBlock, const FVec2F &iCenter, const float iRadius, const int iStartDegree, const int iEndDegree, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawCircle (FBlock &iBlock, const FVec2I &iCenter, const int iRadius, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawCircleAA (FBlock &iBlock, const FVec2I &iCenter, const int iRadius, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawCircleSP (FBlock &iBlock, const FVec2F &iCenter, const float iRadius, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawEllipse (FBlock &iBlock, const FVec2I &iCenter, const int iA, const int iB, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawEllipseAA (FBlock &iBlock, const FVec2I &iCenter, const int iA, const int iB, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawEllipseSP (FBlock &iBlock, const FVec2F &iCenter, const float iA, const float iB, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawLine (FBlock &iBlock, const FVec2I &iP0, const FVec2I &iP1, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawLineAA (FBlock &iBlock, const FVec2I &iP0, const FVec2I &iP1, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawLineSP (FBlock &iBlock, const FVec2F &iP0, const FVec2F &iP1, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawPolygon (FBlock &iBlock, const std::vector< FVec2I > &iPoints, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawPolygonAA (FBlock &iBlock, const std::vector< FVec2I > &iPoints, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawPolygonSP (FBlock &iBlock, const std::vector< FVec2F > &iPoints, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawQuadraticBezier (FBlock &iBlock, const FVec2I &iCtrlPt0, const FVec2I &iCtrlPt1, const FVec2I &iCtrlPt2, const float iWeight, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawQuadraticBezierAA (FBlock &iBlock, const FVec2I &iCtrlPt0, const FVec2I &iCtrlPt1, const FVec2I &iCtrlPt2, const float iWeight, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawQuadraticBezierSP (FBlock &iBlock, const FVec2F &iCtrlPt0, const FVec2F &iCtrlPt1, const FVec2F &iCtrlPt2, const float iWeight, const FColor &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawRectangle (FBlock &iBlock, const FVec2I &iTopLeft, const FVec2I &iBottomRight, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawRotatedEllipse (FBlock &iBlock, const FVec2I &iCenter, const int iA, const int iB, const int iRotationDegrees, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawRotatedEllipseAA (FBlock &iBlock, const FVec2I &iCenter, const int iA, const int iB, const int iRotationDegrees, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | DrawRotatedEllipseSP (FBlock &iBlock, const FVec2F &iCenter, const float iA, const float iB, const int iRotationDegrees, const FColor &iColor=FColor::RGBA8(0, 0, 0), const bool iFilled=false, const FRectI &iClippingRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Dummy_OP (uint32 iNumWait, const FEvent *iWaitList, FEvent *iEvent) |
ulError | Extract (const FBlock &iSource, FBlock &iDestination, uint8 iSourceExtractMask, uint8 iDestinationExtractMask, bool iUseRawMask=false, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
void | Fence () |
ulError | Fill (FBlock &iBlock, const ISample &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | FillPreserveAlpha (FBlock &iBlock, const ISample &iColor=FColor::RGBA8(0, 0, 0), const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Filter (std::function< void(const FBlock &, const uint8 *) > iInvocation, const FBlock &iSource, const FRectI &iSourceRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | FilterInPlace (std::function< void(FBlock &, uint8 *) > iInvocation, FBlock &iDestination, const FRectI &iDestinationRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | FilterInto (std::function< void(const FBlock &, const uint8 *, FBlock &, uint8 *) >, const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
void | Finish () |
ulError | FinishEventNo_OP (FEvent *iEvent, ulError iError) |
void | Flush () |
eFormat | Format () const |
ulError | LinearTosRGB (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | MorphologicalProcess (const FBlock &iSource, FBlock &iDestination, const FStructuringElement &iKernel, const FRectI &iSourceRect=FRectI::Auto, const FVec2I &iPosition=FVec2I(0), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
FContext & | operator= (const FContext &)=delete |
ulError | Premultiply (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | RasterGradient (FBlock &iBlock, const FVec2F &iStart, const FVec2F &iEnd, const FSanitizedGradient &iGradient, float iDithering=0.f, eGradientType iType=eGradientType::Gradient_Linear, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | RasterText (FBlock &iBlock, const std::wstring &iText, const FFont &iFont, uint32 iFontSize=12, const FMat3F &iTransform=FMat3F(), const ISample &iColor=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | RasterTextAA (FBlock &iBlock, const std::wstring &iText, const FFont &iFont, uint32 iFontSize=12, const FMat3F &iTransform=FMat3F(), const ISample &iColor=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Resize (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FRectF &iDestinationRect=FRectF::Auto, eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FBlock *iOptionalSummedAreaTable=nullptr, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | SanitizeZeroAlpha (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | SaveBlockToDisk (const FBlock &iBlock, const std::string &iPath, eFileFormat iFileFormat=eFileFormat::FileFormat_png, int iQuality=100, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | sRGBToLinear (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Swap (FBlock &iBlock, uint8 iChannel1, uint8 iChannel2, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | TransformAffine (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FMat3F &iTransformMatrix=FMat3F(), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | TransformAffineTiled (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FRectI &iDestinationRect=FRectI::Auto, const FMat3F &iTransformMatrix=FMat3F(), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | TransformBezier (const FBlock &iSource, FBlock &iDestination, const TArray< FCubicBezierControlPoint > &iControlPoints, float iThreshold=1.f, uint32 iPlotSize=1, const FRectI &iSourceRect=FRectI::Auto, eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | TransformPerspective (const FBlock &iSource, FBlock &iDestination, const FRectI &iSourceRect=FRectI::Auto, const FMat3F &iTransformMatrix=FMat3F(), eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | Unpremultiply (FBlock &iBlock, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::CacheEfficient, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | ValueNoise (FBlock &iBlock, float iFreq=1.f, int iSeed=-1, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | VoronoiNoise (FBlock &iBlock, uint32 iCount, int iSeed=-1, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
void | Wait (const FEvent &iEvent) |
ulError | WhiteNoise (FBlock &iBlock, int iSeed=-1, const FRectI &iRect=FRectI::Auto, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XAllocateBlockData (FBlock &iBlock, uint16 iWidth, uint16 iHeight, eFormat iFormat=eFormat::Format_RGBA8, const FColorSpace *iColorSpace=nullptr, const FOnInvalidBlock &iOnInvalid=FOnInvalidBlock(), const FOnCleanupData &iOnCleanup=FOnCleanupData(&OnCleanup_FreeMemory), const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XBuildMipMap (const FBlock &iSource, FBlock &iDestination, int iMaxMipLevel=-1, const FRectI &iSourceRect=FRectI::Auto, eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XCreateTestBlock (FBlock &iDestination, const FSchedulePolicy &iPolicy=FSchedulePolicy::MultiScanlines, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XDeallocateBlockData (FBlock &iBlock, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XLoadBlockFromDisk (FBlock &ioBlock, const std::string &iPath, const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
ulError | XProcessBezierDisplacementField (const FBlock &iSource, const FBlock &iDestination, FBlock &iField, FBlock &iMask, const TArray< FCubicBezierControlPoint > &iControlPoints, float iThreshold=1.f, uint32 iPlotSize=1, const FRectI &iSourceRect=FRectI::Auto, eResamplingMethod iResamplingMethod=eResamplingMethod::Resampling_Bilinear, eBorderMode iBorderMode=eBorderMode::Border_Transparent, const ISample &iBorderValue=FColor::RGBA8(0, 0, 0), const FSchedulePolicy &iPolicy=FSchedulePolicy::MonoChunk, uint32 iNumWait=0, const FEvent *iWaitList=nullptr, FEvent *iEvent=nullptr) |
Static Public Member Functions | |
static eFormat | BezierDisplacementFieldMetrics (const FBlock &iSource) |
static eFormat | BezierDisplacementMaskMetrics (const FBlock &iSource) |
static void | LoadBlockFromDiskMetrics (const std::string &iPath, bool *oFileExists, FVec2I *oSize, eFormat *oFormat) |
static void | LoadPSDFromDiskMetrics (const std::string &iPath, bool *oFileExists, eFormat *oFormat) |
static uint8 | MaxMipLevelMetrics (const FRectI &iSource) |
static FRectI | MipLevelMetrics (const FRectI &iSource, uint8 iLevel) |
static FRectI | MipMapMetrics (const FRectI &iSource) |
static void | MipRectsMetrics (const FRectI &iSource, uint8 iMaxLevel, TArray< FRectI > *oArray) |
static void | SaveBlockToDiskMetrics (const FBlock &iBlock, eFileFormat iFileFormat, bool *oCanSaveWithoutProxy) |
static eFormat | SummedAreaTableMetrics (const FBlock &iSource) |
static FRectI | TextMetrics (const std::wstring &iText, const FFont &iFont, uint32 iFontSize=12, const FMat3F &iTransform=FMat3F()) |
static FRectI | TransformAffineMetrics (const FRectI &iSourceRect, const FMat3F &iTransform) |
static FRectI | TransformBezierMetrics (const FRectI &iSourceRect, const TArray< FCubicBezierControlPoint > &iControlPoints) |
static FRectI | TransformPerspectiveMetrics (const FRectI &iSourceRect, const FMat3F &iTransform) |
FContext works on FBlock and is bound to a specific format. It prefetches dispatched implementation to select the fastest method according to the format, its optional specializations, and the runtime device support for multi-threading or SIMD.
There can be multiple FContext instances for different formats. Keep in mind this object is rather heavy as it caches paths to the implementations of each feature it exposes.
FContext can be expected to reach a size in the Ko magnitude, there is a small overhead during instanciation at runtime.
FContext::~FContext | ( | ) |
Destructor. Clean up the contextual dispatch table.
FContext::FContext | ( | FCommandQueue & | iQueue, |
eFormat | iFormat, | ||
ePerformanceIntent | iPerfIntent = ePerformanceIntent::PerformanceIntent_Max |
||
) |
Constructor. Builds the contextual dispatch table. Construction has significant overhead, preferably construct a context once at the beginning. A queue can be shared beetween multiple contexts with no issue.
|
delete |
ulError FContext::AccumulateSample | ( | const FBlock & | iBlock, |
FColor * | oColor, | ||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an accumulative sampling operation on iBlock to get an averaged area sample of a given input rect. The input block will not be modified. This will work with any formats, The result of the analysis operation will be stored in the oColor parameter, it is unsafe to read or modify this oColor until the command is finished, you can ensure that with a Fence on the event or a Finish on the context.
ulError FContext::AlphaBlend | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an alpha blend operation with iSource composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iSource is left untouched.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to blend the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iBackdrop the iSource FBlock should be composited, in integer coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::AlphaBlendAA | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2F & | iPosition = FVec2F(0.f, 0.f) , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an antialiased alpha blend operation with iSource composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iSource is left untouched.
An antialiasing blend accepts floating point coordinates and performs antialiasing at the same time as it performs the compositing, this is useful for drawing, sometimes also referred to as subpixel blending.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to blend the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iBackdrop the iSource FBlock should be composited, in floating point coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::AnalyzeSmallestVisibleRect | ( | const FBlock & | iBlock, |
FRectI * | oRect, | ||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an analysis operation on iBlock to detect the smallest possible rect that has visual information with alpha > 0. The input block will not be modified. This will work with any formats, but formats without an alpha channel will actually return immediately with a rectangle the same size as the block. The result of the analysis operation will be stored in the oRect parameter, it is unsafe to read or modify this oRect until the command is finished, you can ensure that with a Fence on the event or a Finish on the context.
Get metrics before building a bezier displacement field, this will give you the needed format before building. same size.
Get metrics before building a bezier displacement mask, this will give you the needed format before building. same size.
ulError FContext::Blend | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eBlendMode | iBlendingMode = Blend_Normal , |
||
eAlphaMode | iAlphaMode = Alpha_Normal , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a blend operation with iSource composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iSource is left untouched.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to blend the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iBackdrop the iSource FBlock should be composited, in integer coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::BlendAA | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2F & | iPosition = FVec2F(0.f, 0.f) , |
||
eBlendMode | iBlendingMode = Blend_Normal , |
||
eAlphaMode | iAlphaMode = Alpha_Normal , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an antialiased blend operation with iSource composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iSource is left untouched.
An antialiasing blend accepts floating point coordinates and performs antialiasing at the same time as it performs the compositing, this is useful for drawing, sometimes also referred to as subpixel blending.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to blend the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iBackdrop the iSource FBlock should be composited, in floating point coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::BlendBucket | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const TArray< FVec2I > & | iPosition = TArray< FVec2I >(1) , |
||
eBlendMode | iBlendingMode = Blend_Normal , |
||
eAlphaMode | iAlphaMode = Alpha_Normal , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Blend a bucket of the same source at different positions, with potential concurrency so an event dependency graph is automatically generated. May be used for particles drawing. There will be as many blends as there are elements in the positions array.
ulError FContext::BlendColor | ( | const ISample & | iColor, |
FBlock & | iBackdrop, | ||
const FRectI & | iBackdropRect = FRectI::Auto , |
||
eBlendMode | iBlendingMode = Blend_Normal , |
||
eAlphaMode | iAlphaMode = Alpha_Normal , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a blend operation of a single plain color composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iColor is left untouched.
If the specified rect and/or position lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::BlendTiled | ( | const FBlock & | iSource, |
FBlock & | iBackdrop, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FRectI & | iBackdropRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eBlendMode | iBlendingMode = Blend_Normal , |
||
eAlphaMode | iAlphaMode = Alpha_Normal , |
||
ufloat | iOpacity = 1.0f , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a tiled blend operation with iSource composited on top of iBackdrop. iBackdrop is modified to receive the result of the operation, while iSource is left untouched. iSource is tiled over the specified surface to cover iBackdrop.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to blend the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iBackdrop the iSource FBlock should be composited, in integer coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iBackdrop, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::BrownianNoise | ( | FBlock & | iBlock, |
float | iFrequency = 0.22f , |
||
float | iFrequencyMult = 1.8f , |
||
float | iAmplitudeMult = 0.35f , |
||
uint8 | iNumLayers = 5 , |
||
int | iSeed = -1 , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Render brownian noise
ulError FContext::BuildPremultipliedSummedAreaTable | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Build a Summed Area Table ( used for Area resampling ) into iDestination, with premultiplication.
ulError FContext::BuildSummedAreaTable | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Build a Summed Area Table ( used for Area resampling ) into iDestination.
ulError FContext::Clear | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a clear operation on the input block. iBlock is modified to be cleared.
You can specify a sub-portion of the iBlock image by specifying the iRect to the desired part of the picture. If you want to clear the whole image, use the FBlock::Rect() method on the iBlock.
If the iRect lead to a destination geometry that does not intersect the rectangular geometry of iBlock, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::Clouds | ( | FBlock & | iBlock, |
int | iSeed = -1 , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Render cloud noise, brownian with specific params.
ulError FContext::ConvertFormat | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a conv operation with iSource converted into iDestination. iDestination is modified to receive the result of the operation, while iSource is left untouched.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to convert the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iDestination the iSource FBlock should be converted, in integer coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iDestination, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::Convolve | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. Convolve operator is average by default here.
ulError FContext::ConvolveMax | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. Convolve operator is max by default here.
ulError FContext::ConvolveMin | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. Convolve operator is max by default here.
ulError FContext::ConvolvePremult | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. This version of Convolve performs an on-the fly premultiplication, suitable for unpremultiplied formats without having to make a conversion first. Use when you have only on convolution to do.
ulError FContext::ConvolvePremultMax | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. This version of Convolve performs an on-the fly premultiplication, suitable for unpremultiplied formats without having to make a conversion first. Use when you have only on convolution to do.
ulError FContext::ConvolvePremultMin | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FKernel & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination. This version of Convolve performs an on-the fly premultiplication, suitable for unpremultiplied formats without having to make a conversion first. Use when you have only on convolution to do.
ulError FContext::Copy | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a copy operation with iSource copied into iDestination. iDestination is modified to receive the result of the operation, while iSource is left untouched.
You can specify a sub-portion of the iSource image by specifying the iSourceRect to the desired part of the picture. If you want to convert the whole image, use the FBlock::Rect() method on the iSource block. You can also specify where in iDestination the iSource FBlock should be copied, in integer coordinates.
If the iSourceRect and/or iPosition lead to a destination geometry that does not intersect the rectangular geometry of iDestination, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::DrawArc | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iRadius, | ||
const int | iStartDegree, | ||
const int | iEndDegree, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle arc. Using Andres algorithm.
ulError FContext::DrawArcAA | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iRadius, | ||
const int | iStartDegree, | ||
const int | iEndDegree, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle arc. AA version. Using Andres algorithm.
ulError FContext::DrawArcSP | ( | FBlock & | iBlock, |
const FVec2F & | iCenter, | ||
const float | iRadius, | ||
const int | iStartDegree, | ||
const int | iEndDegree, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle arc. SP version. Using Andres algorithm.
ulError FContext::DrawCircle | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iRadius, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle. Using Andres algorithm.
ulError FContext::DrawCircleAA | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iRadius, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle. AA version. Using Andres algorithm.
ulError FContext::DrawCircleSP | ( | FBlock & | iBlock, |
const FVec2F & | iCenter, | ||
const float | iRadius, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a circle. SP version. Using Andres algorithm.
ulError FContext::DrawEllipse | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iA, | ||
const int | iB, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws an ellipse
ulError FContext::DrawEllipseAA | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iA, | ||
const int | iB, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws an ellipse, AA version
ulError FContext::DrawEllipseSP | ( | FBlock & | iBlock, |
const FVec2F & | iCenter, | ||
const float | iA, | ||
const float | iB, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws an ellipse, AA version
ulError FContext::DrawLine | ( | FBlock & | iBlock, |
const FVec2I & | iP0, | ||
const FVec2I & | iP1, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a line between iP0 and iP1
ulError FContext::DrawLineAA | ( | FBlock & | iBlock, |
const FVec2I & | iP0, | ||
const FVec2I & | iP1, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a line between iP0 and iP1, AA version
ulError FContext::DrawLineSP | ( | FBlock & | iBlock, |
const FVec2F & | iP0, | ||
const FVec2F & | iP1, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a line between iP0 and iP1, SP version
ulError FContext::DrawPolygon | ( | FBlock & | iBlock, |
const std::vector< FVec2I > & | iPoints, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a polygon
ulError FContext::DrawPolygonAA | ( | FBlock & | iBlock, |
const std::vector< FVec2I > & | iPoints, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a polygon, AA version
ulError FContext::DrawPolygonSP | ( | FBlock & | iBlock, |
const std::vector< FVec2F > & | iPoints, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a polygon, SP version
ulError FContext::DrawQuadraticBezier | ( | FBlock & | iBlock, |
const FVec2I & | iCtrlPt0, | ||
const FVec2I & | iCtrlPt1, | ||
const FVec2I & | iCtrlPt2, | ||
const float | iWeight, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a quadratic bezier
ulError FContext::DrawQuadraticBezierAA | ( | FBlock & | iBlock, |
const FVec2I & | iCtrlPt0, | ||
const FVec2I & | iCtrlPt1, | ||
const FVec2I & | iCtrlPt2, | ||
const float | iWeight, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a quadratic bezier, AA version
ulError FContext::DrawQuadraticBezierSP | ( | FBlock & | iBlock, |
const FVec2F & | iCtrlPt0, | ||
const FVec2F & | iCtrlPt1, | ||
const FVec2F & | iCtrlPt2, | ||
const float | iWeight, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a quadratic bezier, AA version
ulError FContext::DrawRectangle | ( | FBlock & | iBlock, |
const FVec2I & | iTopLeft, | ||
const FVec2I & | iBottomRight, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a rectangle
ulError FContext::DrawRotatedEllipse | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iA, | ||
const int | iB, | ||
const int | iRotationDegrees, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a rotated ellipse
ulError FContext::DrawRotatedEllipseAA | ( | FBlock & | iBlock, |
const FVec2I & | iCenter, | ||
const int | iA, | ||
const int | iB, | ||
const int | iRotationDegrees, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a rotated ellipse
ulError FContext::DrawRotatedEllipseSP | ( | FBlock & | iBlock, |
const FVec2F & | iCenter, | ||
const float | iA, | ||
const float | iB, | ||
const int | iRotationDegrees, | ||
const FColor & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const bool | iFilled = false , |
||
const FRectI & | iClippingRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Draws a rotated ellipse
ulError FContext::Extract | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
uint8 | iSourceExtractMask, | ||
uint8 | iDestinationExtractMask, | ||
bool | iUseRawMask = false , |
||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an extract operation from the input source into the destination. The result of the extract is that channels specified by the input masks are extracted from the source and placed in the destination, with the appropriate type transformation if necessary.
Masks are used as bitfields, if a bit is on that means the channel is up for extraction.
void FContext::Fence | ( | ) |
Wait for completion of all already issued commands
ulError FContext::Fill | ( | FBlock & | iBlock, |
const ISample & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a fill operation in iBlock. iBlock is modified to receive the result of the operation.
You can specify a sub-portion of the iBlock image by specifying the iRect to the desired part of the picture. If you want to fill the whole image, use the FBlock::Rect() method on the iBlock.
If the iRect lead to a destination geometry that does not intersect the rectangular geometry of iBlock, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::FillPreserveAlpha | ( | FBlock & | iBlock, |
const ISample & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a fill operation in iBlock while preserving alpha. The color will change but the alpha will remain intact. iBlock is modified to receive the result of the operation.
You can specify a sub-portion of the iBlock image by specifying the iRect to the desired part of the picture. If you want to fill the whole image, use the FBlock::Rect() method on the iBlock.
If the iRect lead to a destination geometry that does not intersect the rectangular geometry of iBlock, the call will not perform any computation and will return safely, so it is safe to specify out-of-bounds positions.
ulError FContext::Filter | ( | std::function< void(const FBlock &, const uint8 *) > | iInvocation, |
const FBlock & | iSource, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a filter operation on the block. The block will not be modified but the process will iterate over it and invoke the input function for every pixel. You can read and compute things while it does so within the function you provide and collect results with an event callback or a lambda capture scope.
ulError FContext::FilterInPlace | ( | std::function< void(FBlock &, uint8 *) > | iInvocation, |
FBlock & | iDestination, | ||
const FRectI & | iDestinationRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a filter in place operation on the block. The block can be modified, and the process will iterate over it and invoke the input function for every pixel. You can read and write pixels and compute anything while it does so within the function you provide.
ulError FContext::FilterInto | ( | std::function< void(const FBlock &, const uint8 *, FBlock &, uint8 *) > | , |
const FBlock & | iSource, | ||
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a filter into operation on the blocks. The source block can't be modified, but the process will iterate over it and invoke the input function for every pixel. The destination block can be modified. You can read and write pixels and compute anything while it does so within the function you provide.
void FContext::Finish | ( | ) |
Issue all commands and wait for completion
Internal tool for notifying an user event the task is a no-op
void FContext::Flush | ( | ) |
Issue all commands and return immediately.
eFormat FContext::Format | ( | ) | const |
Getter for the context format
ulError FContext::LinearTosRGB | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a gamma compress from linear RGB to sRGB on the input block. The input block will be modified in place. This will work with any formats, but makes sense only for formats with color models GREY or RGB, with or without alpha. In case of grey, it will work like linear grey to sGrey.
|
static |
Perform a load operation into the input ioBlock. The result of the load is written in the ioBlock.
The internal size and data of ioBlock will be changed to match that of the file. The format will remain the same as the block. The method might reallocate the internal data of the ioBlock asynchronously, but the ioBlock reference itself is not invalidated. It is only safe to access the ioBlock fields after the command has actually completed, you can ensure that with a Fence, a Finish, a Wait on the associated FEvent, or with an FEvent callback.
If the internals are invalidated, the cleanup function of the internal data will be called and could destroy the already present memory so make sure it is not referenced elsewhere. / ulError LoadProxyFromDisk( FBlock& ioBlock , eFormat iFormat , const std::string& iPath , const FSchedulePolicy& iPolicy = FSchedulePolicy() , uint32 iNumWait = 0 , const FEvent* iWaitList = nullptr , FEvent* iEvent = nullptr );
/*! Perform a save operation of the input iBlock at the specified path. iQuality is only used for jpeg files and is beetween 0 and 100
The conversion that is performed will use the equivalent of a call to ConvertFormat() beforehand, so the saved file will be the converted version and upon reloading the file, it may not match the initial format. For instance, saving a block with eFormat::Format_LabAF with an input eFileFormat::FileFormat_png will trigger a conversion to eFormat::Format_RGBA8 beforehand, so when loading the same file it will have format eFormat::Format_RGBA8, the Lab information was lost in the process.
/*! Collect metrics before a LoadBlockFromDisk call
|
static |
Perform a flattened blend of the whole layer stack
Collect metrics before a XLoadPSDFromDisk call
Get metrics for a mip level.
Get metrics for a mip level.
Get metrics before building a mip map.
|
static |
Get metrics for a mip level.
ulError FContext::MorphologicalProcess | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FStructuringElement & | iKernel, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FVec2I & | iPosition = FVec2I(0) , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a convolution operation with iSource as input. The result is written in iDestination.
ulError FContext::Premultiply | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a premultiplication operation in iBlock. The input block will be modified in place. This will work with any formats, but formats without an alpha channel will actually return immediately in a no-op.
ulError FContext::RasterGradient | ( | FBlock & | iBlock, |
const FVec2F & | iStart, | ||
const FVec2F & | iEnd, | ||
const FSanitizedGradient & | iGradient, | ||
float | iDithering = 0.f , |
||
eGradientType | iType = eGradientType::Gradient_Linear , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a load of a PSD file in a layer stack
Raster a linear gradient on the destination block. The iDithering parameter is a normal param clamped beetween 0 and 1. 0: 0% 1: 100%
ulError FContext::RasterText | ( | FBlock & | iBlock, |
const std::wstring & | iText, | ||
const FFont & | iFont, | ||
uint32 | iFontSize = 12 , |
||
const FMat3F & | iTransform = FMat3F() , |
||
const ISample & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a text raster operation in iBlock. iBlock is modified to receive the result of the operation.
If the text leads to a destination geometry that does not intersect the rectangular geometry of iBlock, the call will not perform any computation and will return safely. It is also safe to specify out-of-bounds positions, but the text can be cropped.
You can use TextMetrics() in order to retrieve the geometry before drawing.
ulError FContext::RasterTextAA | ( | FBlock & | iBlock, |
const std::wstring & | iText, | ||
const FFont & | iFont, | ||
uint32 | iFontSize = 12 , |
||
const FMat3F & | iTransform = FMat3F() , |
||
const ISample & | iColor = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a text raster operation in iBlock with text antialiasing. iBlock is modified to receive the result of the operation.
If the text leads to a destination geometry that does not intersect the rectangular geometry of iBlock, the call will not perform any computation and will return safely. It is also safe to specify out-of-bounds positions, but the text can be cropped.
You can use TextMetrics() in order to retrieve the geometry before drawing.
ulError FContext::Resize | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FRectF & | iDestinationRect = FRectF::Auto , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FBlock * | iOptionalSummedAreaTable = nullptr , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a resize operation using iSource as input. The result is written in the iDestination block.
A resize is simply a scale of an input source.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.
It is advised to use Resize() instead of TransformAffine() when you only need a rescale, because the implementation can be made faster by relying on this assumption. This is also the only method that can handle the more advanced resampling methods, such as eResamplingMethod::Resampling_Area.
ulError FContext::SanitizeZeroAlpha | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a sanitize operation in iBlock. The input block will be modified in place. This will work with any formats, but formats without an alpha channel will actually return immediately in a no-op. What SanitizeZeroAlpha is set the color components to zero if the alpha is already zero for a given pixel.
ulError FContext::SaveBlockToDisk | ( | const FBlock & | iBlock, |
const std::string & | iPath, | ||
eFileFormat | iFileFormat = eFileFormat::FileFormat_png , |
||
int | iQuality = 100 , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a save operation of the input iBlock at the specified path. iQuality is only used for jpeg files and is beetween 0 and 100
You can either perform a conversion in an appropriate format beforehand, or use the SaveProxyToDisk() to make sure it is always saved, at the cost of a potential extra conversion call. See the docs for SaveProxyToDisk() as it has drawbacks too.
|
static |
Collect metrics before a SaveBlockToDisk call
ulError FContext::sRGBToLinear | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a gamma uncompress from sRGB to linear RGB on the input block. The input block will be modified in place. This will work with any formats, but makes sense only for formats with color models GREY or RGB, with or without alpha. In case of grey, it will work like sGrey to linear grey.
Get metrics before building a SAT, this will give you the needed format before building the sat. A block used for SAT based in input iSource needs to have the same format as the source, but with its type changed to float, and it must have the same size.
ulError FContext::Swap | ( | FBlock & | iBlock, |
uint8 | iChannel1, | ||
uint8 | iChannel2, | ||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a swap operation in iBlock. The input block will be modified in place. This will work with any formats. You specify input channels and they are swapped accross the entire block.
|
static |
Collect text metrics before a text raster operation. This can help you position your text geometry beforehand. Unlike the other methods of FContext, this doesn't work on images and returns immediately, it is not scheduled in the Queue.
ulError FContext::TransformAffine | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FMat3F & | iTransformMatrix = FMat3F() , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an affine transform operation using iSource as input. The result is written in the iDestination block.
An affine transform is a linear transformation such as a translation, scale, rotation, skew, or any combination of these.
You can use TransformAffineMetrics() in order to compute the geometry of the transformed output before actually scheduling the operation.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.
|
static |
Collect metrics before a TransformAffine() operation.
ulError FContext::TransformAffineTiled | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FRectI & | iDestinationRect = FRectI::Auto , |
||
const FMat3F & | iTransformMatrix = FMat3F() , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an affine transform operation using iSource as input. The result is written in the iDestination block.
An affine transform is a linear transformation such as a translation, scale, rotation, skew, or any combination of these.
You can use TransformAffineMetrics() in order to compute the geometry of the transformed output before actually scheduling the operation.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.
This tiled version allows to cover the area specified by iDestinationRect by repeating the transformed source in a pattern inside the destination.
ulError FContext::TransformBezier | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const TArray< FCubicBezierControlPoint > & | iControlPoints, | ||
float | iThreshold = 1.f , |
||
uint32 | iPlotSize = 1 , |
||
const FRectI & | iSourceRect = FRectI::Auto , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a bezier transform operation using iSource as input. The result is written in the iDestination block.
A bezier transform is a distortion of an input source covering a 2D bezier surface shape. Think about a flag.
You can use TransformBezierMetrics() in order to compute the geometry of the transformed output before actually scheduling the operation.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.
|
static |
Collect metrics before a TransformBezier() operation.
ulError FContext::TransformPerspective | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
const FRectI & | iSourceRect = FRectI::Auto , |
||
const FMat3F & | iTransformMatrix = FMat3F() , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an homography or perspective transform operation using iSource as input. The result is written in the iDestination block.
An homography is a distortion transform that doesn't necessarilly preserve features such as parallel lines.
You can use TransformPerspectiveMetrics() in order to compute the geometry of the transformed output before actually scheduling the operation.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.
|
static |
Collect metrics before a TransformPerspective() operation.
ulError FContext::Unpremultiply | ( | FBlock & | iBlock, |
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::CacheEfficient , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform an unpremultiplication operation in iBlock. The input block will be modified in place. This will work with any formats, but formats without an alpha channel will actually return immediately in a no-op.
ulError FContext::ValueNoise | ( | FBlock & | iBlock, |
float | iFreq = 1.f , |
||
int | iSeed = -1 , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Render value noise
ulError FContext::VoronoiNoise | ( | FBlock & | iBlock, |
uint32 | iCount, | ||
int | iSeed = -1 , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Render voronoi noise
void FContext::Wait | ( | const FEvent & | iEvent | ) |
Wait for completion of a given event.
ulError FContext::WhiteNoise | ( | FBlock & | iBlock, |
int | iSeed = -1 , |
||
const FRectI & | iRect = FRectI::Auto , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Render white noise
ulError FContext::XAllocateBlockData | ( | FBlock & | iBlock, |
uint16 | iWidth, | ||
uint16 | iHeight, | ||
eFormat | iFormat = eFormat::Format_RGBA8 , |
||
const FColorSpace * | iColorSpace = nullptr , |
||
const FOnInvalidBlock & | iOnInvalid = FOnInvalidBlock() , |
||
const FOnCleanupData & | iOnCleanup = FOnCleanupData(&OnCleanup_FreeMemory) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a block allocation or reallocation on the input iBlock. Any data that was there will be deleted and replaced according to the input parameters. This is mostly useful for internal subcommands but it might be usefull for delegating allocation of many blocks on a separate thread for a non-blocking flow.
It is recommended to use it on a block created from FBlock::MakeHollow() so that no resources are wasted.
ulError FContext::XBuildMipMap | ( | const FBlock & | iSource, |
FBlock & | iDestination, | ||
int | iMaxMipLevel = -1 , |
||
const FRectI & | iSourceRect = FRectI::Auto , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a build mip map by chaining halving bilinear resizes.
ulError FContext::XCreateTestBlock | ( | FBlock & | iDestination, |
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MultiScanlines , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Create a simple small 64x64 block for testing purposes, in the context format.
ulError FContext::XDeallocateBlockData | ( | FBlock & | iBlock, |
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a block deallocation on the input iBlock. Any data that was there will be deleted and replaced by nullptr. The block will have no size or data once the command is finished. It might be usefull for delegating deallocation of many blocks on a separate thread for a non-blocking flow.
ulError FContext::XLoadBlockFromDisk | ( | FBlock & | ioBlock, |
const std::string & | iPath, | ||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a load operation into the input ioBlock. The result of the load is written in the ioBlock.
The internal size and formats of ioBlock will be changed to match that of the file. The method might reallocate the internal data of the ioBlock asynchronously, but the ioBlock reference itself is not invalidated. It is only safe to access the ioBlock fields after the command has actually completed, you can ensure that with a Fence, a Finish, a Wait on the associated FEvent, or with an FEvent callback.
If the internals are invalidated, the cleanup function of the internal data will be called and could destroy the already present memory so make sure it is not referenced elsewhere.
ulError FContext::XProcessBezierDisplacementField | ( | const FBlock & | iSource, |
const FBlock & | iDestination, | ||
FBlock & | iField, | ||
FBlock & | iMask, | ||
const TArray< FCubicBezierControlPoint > & | iControlPoints, | ||
float | iThreshold = 1.f , |
||
uint32 | iPlotSize = 1 , |
||
const FRectI & | iSourceRect = FRectI::Auto , |
||
eResamplingMethod | iResamplingMethod = eResamplingMethod::Resampling_Bilinear , |
||
eBorderMode | iBorderMode = eBorderMode::Border_Transparent , |
||
const ISample & | iBorderValue = FColor::RGBA8(0, 0, 0) , |
||
const FSchedulePolicy & | iPolicy = FSchedulePolicy::MonoChunk , |
||
uint32 | iNumWait = 0 , |
||
const FEvent * | iWaitList = nullptr , |
||
FEvent * | iEvent = nullptr |
||
) |
Perform a bezier transform operation using iSource as input. The result is written in the iDestination block.
A bezier transform is a distortion of an input source covering a 2D bezier surface shape. Think about a flag.
You can use TransformBezierMetrics() in order to compute the geometry of the transformed output before actually scheduling the operation.
You can specify a sub-rectangular area in the source input with the iSourceRect input parameter.