# Warp Image Bounds

Warp image bounds comprise upper left corner point of the bitmap image area, its width, and height (normalized to the range \[0..1\]).

They are used to specify to <span style="color: rgb(230, 126, 35);">[Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]")</span> which part of the rendered display image shall be mapped to the warping mesh computed from the warp matrix. If not specified, then the complete display image will be mapped.

The following code snippet shows how to retrieve the warp image bounds from the Warping library. These can be further passed to <span style="color: rgb(230, 126, 35);">[Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]")</span> through the public interface of Candera::Display class using Candera::Display::SetWarpImageBounds.

```
    WRP_SFLOAT textureOriginX; 
    WRP_SFLOAT textureOriginY;
    WRP_SFLOAT textureWidth;
    WRP_SFLOAT textureHeight;
    
    // retrieve warpTextureBounds
    ComputeWarpImageBoundsFromConfig(&stcWarpConfigParams, &textureOriginX, &textureOriginY, &textureWidth, &textureHeight);
    <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_rectangle.html" title="Represents a rectangle.">Candera::Rectangle</a> warpTextureBounds(textureOriginX, textureOriginY, textureWidth, textureHeight);
      
    // set the bounds of the warping texture  
    display->SetWarpImageBounds(warpTextureBounds);
```

##### Example

<div class="contents" id="bkmrk-warping-is-disabled-"><div class="contents"><div class="textblock"><table border="0" cellpadding="5" cellspacing="0" style="width: 809px;" width="600"><tbody><tr><td style="width: 404px;">**Warping is disabled**   
Display Area: 480x240   
BitmapArea: 408x190  
<div class="image"><div drawio-diagram="2113"><img src="https://doc316en.candera.eu/uploads/images/drawio/2023-02/drawing-7-1676962315.png" alt=""/></div>

</div></td></tr><tr><td style="width: 404px;">**Warping is enabled, image bounds are not specified**   
Display Area: 480x240   
BitmapArea: 408x190 | Illuminated Area: 480x240  
<div class="image"><div drawio-diagram="2114"><img src="https://doc316en.candera.eu/uploads/images/drawio/2023-02/drawing-7-1676962331.png" alt=""/></div>

</div></td><td style="width: 404px;">**Warping is enabled, image bounds are specified**   
Display Area: 480x240   
BitmapArea: 408x190 | Illuminated Area: 480x240  
<div class="image"><div drawio-diagram="2115"><img src="https://doc316en.candera.eu/uploads/images/drawio/2023-02/drawing-7-1676962355.png" alt=""/></div>

</div></td></tr></tbody></table>

---

</div></div></div>