载入中...
搜索中...
未找到
UvPaintRegion.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4
5namespace eve::image {
6
10 int centerX = 0, centerY = 0;
11 int minX = 0, minY = 0, maxX = 0, maxY = 0;
12 float u = 0.f, v = 0.f, radiusU = 0.f, radiusV = 0.f;
13 float r = 0.f, g = 0.f, b = 0.f, a = 0.f;
14
16 [[nodiscard]] int width() const noexcept { return maxX - minX + 1; }
18 [[nodiscard]] int height() const noexcept { return maxY - minY + 1; }
37 [[nodiscard]] Result<void> prepareResult(int width, int height, float centerU, float centerV, float brushRadiusU,
38 float brushRadiusV, float red, float green, float blue, float alpha,
39 bool flipV = true);
40};
41
60[[nodiscard]] Result<UvPaintRegion> prepareUvPaintRegionResult(int targetWidth, int targetHeight, float u, float v,
61 float radiusU, float radiusV, float r, float g, float b,
62 float a, bool flipV = true);
63
64} // namespace eve::image
tensor::Graph g
Definition GpuGraph.cpp:7
float u
Definition Grass.cpp:233
double r
float v
MeleePoint3 b
Definition MeleeHit.cpp:41
MeleePoint3 a
Definition MeleeHit.cpp:40
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Result< UvPaintRegion > prepareUvPaintRegionResult(int targetWidth, int targetHeight, float u, float v, float radiusU, float radiusV, float r, float g, float b, float a, bool flipV)
Validate and prepare the canonical clipped region for a UV brush.
Reusable renderer-neutral bounds for one normalized UV paint operation.
Result< void > prepareResult(int width, int height, float centerU, float centerV, float brushRadiusU, float brushRadiusV, float red, float green, float blue, float alpha, bool flipV=true)
Atomically replace this reusable scratch with a validated region.
int height() const noexcept
Inclusive clipped height in pixels.
int width() const noexcept
Inclusive clipped width in pixels.