<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cuvilib.com/index.php?action=history&amp;feed=atom&amp;title=Function%3ARectangle</id>
	<title>Function:Rectangle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cuvilib.com/index.php?action=history&amp;feed=atom&amp;title=Function%3ARectangle"/>
	<link rel="alternate" type="text/html" href="https://wiki.cuvilib.com/index.php?title=Function:Rectangle&amp;action=history"/>
	<updated>2026-08-16T21:48:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.cuvilib.com/index.php?title=Function:Rectangle&amp;diff=621&amp;oldid=prev</id>
		<title>Jawad: Created page with &quot;__NOTOC__  Draws a rectangle of specified color on the image.  ===Function=== {| |style=&quot;font-size:150%;&quot;| &lt;syntaxhighlight lang=&quot;cpp&quot;&gt; CuviStatus rectangle(CuviImage&amp; image, ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cuvilib.com/index.php?title=Function:Rectangle&amp;diff=621&amp;oldid=prev"/>
		<updated>2013-04-18T06:12:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  Draws a rectangle of specified color on the image.  ===Function=== {| |style=&amp;quot;font-size:150%;&amp;quot;| &amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CuviStatus rectangle(CuviImage&amp;amp; image, ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle of specified color on the image.&lt;br /&gt;
&lt;br /&gt;
===Function===&lt;br /&gt;
{|&lt;br /&gt;
|style=&amp;quot;font-size:150%;&amp;quot;|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
CuviStatus rectangle(CuviImage&amp;amp; image,&lt;br /&gt;
	             const CuviRect&amp;amp; rect,&lt;br /&gt;
                     const CuviScalar&amp;amp; color,&lt;br /&gt;
                     const CuviStream&amp;amp; stream = CuviStream());&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name	&lt;br /&gt;
! Type	&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| image&lt;br /&gt;
| CuviImage&amp;amp;&lt;br /&gt;
| Input Image&lt;br /&gt;
|-&lt;br /&gt;
| rect&lt;br /&gt;
| const CuviRect&amp;amp;	&lt;br /&gt;
| Region of the image on which to draw the rectangle&lt;br /&gt;
|-&lt;br /&gt;
| color&lt;br /&gt;
| const CuviScalar&amp;amp;&lt;br /&gt;
| Color of the rectangle&lt;br /&gt;
|-&lt;br /&gt;
| stream &lt;br /&gt;
| const CuviStream&amp;amp;&lt;br /&gt;
| GPU stream ID for execution&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Image Type Support===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Input&lt;br /&gt;
! Output&lt;br /&gt;
|-&lt;br /&gt;
| 8uC1&lt;br /&gt;
| 8uC1&lt;br /&gt;
|-&lt;br /&gt;
| 8uC3&lt;br /&gt;
| 8uC3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
{|&lt;br /&gt;
|style=&amp;quot;font-size:150%;&amp;quot;|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//Read an image from the disk&lt;br /&gt;
CuviImage image = cuvi::io::loadImage(path);&lt;br /&gt;
&lt;br /&gt;
//Draw a 100 x 100 rectangle on the image starting from pixel (10,10)&lt;br /&gt;
CuviRect rect(10,10,100,100);&lt;br /&gt;
&lt;br /&gt;
//Set the color of the rectangle&lt;br /&gt;
CuviScalar redColor(0,0,255);&lt;br /&gt;
&lt;br /&gt;
//Draw the rectangle on the image&lt;br /&gt;
cuvi::dataExchange::rectangle(image,rect,color);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Jawad</name></author>
	</entry>
</feed>