From ee9286f24096448cb205b02688d9cff87ba732a9 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 19 Sep 2016 11:34:48 -0700 Subject: [PATCH] Rename Evaluate and Transform --- DirectXTex.md | 4 ++-- Evaluate.md => EvaluateImage.md | 4 ++-- Transform.md => TransformImage.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) rename Evaluate.md => EvaluateImage.md (91%) rename Transform.md => TransformImage.md (92%) diff --git a/DirectXTex.md b/DirectXTex.md index 1b6c280..a5760a9 100644 --- a/DirectXTex.md +++ b/DirectXTex.md @@ -74,8 +74,8 @@ _The majority of these functions cannot operate on planar or palettized formats. * [[ComputeNormalMap]] - Converts a height-map to a normal-map * [[CopyRectangle]] - Copies a rectangle from a soure image to a destination image. Does not support block compressed formats * [[ComputeMSE]] - Computes the mean-squared error for each component based on two input images -* [[Evaluate]] - Evaluates a user-defined function for an input image -* [[Transform]] - Create a new image from an existing image with a user-defined function +* [[EvaluateImage]] - Evaluates a user-defined function for an input image +* [[TransformImage]] - Create a new image from an existing image with a user-defined function See [[Filter Flags]], [[Texconv]], [[Texassemble]] diff --git a/Evaluate.md b/EvaluateImage.md similarity index 91% rename from Evaluate.md rename to EvaluateImage.md index c52ed69..dd2298d 100644 --- a/Evaluate.md +++ b/EvaluateImage.md @@ -1,6 +1,6 @@ Evaluates a user-supplied function across an image. - HRESULT __valuate(const Image& image, + HRESULT EvaluateImage(const Image& image, std::function< void(const XMVECTOR* pixels, size_t width, size_t y) > pixelFunc ); @@ -14,7 +14,7 @@ _pixelFunc_: A callback function to invoke for each scanline of the image. This function computes the maximum luminance of an input. XMVECTOR maxLum = XMVectorZero(); - HRESULT hr = Evaluate(*image.GetImage(0, 0, 0), + HRESULT hr = EvaluateImage(*image.GetImage(0, 0, 0), [&](const XMVECTOR* pixels, size_t width, size_t y) { UNREFERENCED_PARAMETER(y); diff --git a/Transform.md b/TransformImage.md similarity index 92% rename from Transform.md rename to TransformImage.md index a89c222..86d108d 100644 --- a/Transform.md +++ b/TransformImage.md @@ -1,13 +1,13 @@ Creates a new image by executing a user-supplied function across an input image. - HRESULT Transform( + HRESULT TransformImage( const Image& image, std::function< void(XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y) > pixelFunc, ScratchImage& result ); - HRESULT Transform( + HRESULT TransformImage( const Image* srcImages, size_t nimages, const TexMetadata& metadata, std::function< void(XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y) @@ -21,7 +21,7 @@ _pixelFunc_: A callback function to invoke for each scanline of the image which # Example This function performs a colorkey or [chromakey](https://en.wikipedia.org/wiki/Chroma_key) transformation setting alpha to 0 (transparent) wherever the color is found and 1 (opaque) otherwise. - hr = Transform(image->GetImages(), image->GetImageCount(), image->GetMetadata(), + hr = TransformImage(image->GetImages(), image->GetImageCount(), image->GetMetadata(), [](XMVECTOR* outPixels, const XMVECTOR* inPixels, size_t width, size_t y) { static const XMVECTORF32 s_chromaKey = { 0.f, 1.f, 0.f, 0.f };