载入中...
搜索中...
未找到
ImageScale.cpp
浏览该文件的文档.
12 return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, message, "image.scalePcg"));
Stable, structured diagnostics shared by engine modules.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
void getPixel(int x, int y, Colorf &c) const
Gets the pixel at location (x,y).
Definition ImageData.cpp:535
void setPixel(int x, int y, const Colorf &p)
Sets the pixel at location (x,y).
Definition ImageData.cpp:484
eve::Result< int > scalePcg(int newWidth, int newHeight, ImageScaleFilter filter)
Resize this image with Pcg ScaleTexture's exact point or bilinear coordinate mapping.
Definition ImageScale.cpp:10
void adopt(eve::Resource &replacement) override
Replace this instance's pixels with replacement's (cache reload). The replacement is drained; its des...
Definition ImageData.cpp:62
Definition AvatarInstance.h:25
ImageScaleFilter
Sampling modes used by Pcg-compatible in-place texture scaling.
Definition ImageData.h:26
@ Bilinear
@ InvalidArgument