mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-12 19:40:28 +02:00
651 lines
128 KiB
HTML
651 lines
128 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>IntelliPhoto: src/Layer/PaintingArea.cpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">IntelliPhoto
|
|
 <span id="projectnumber">0.5</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('_painting_area_8cpp_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">PaintingArea.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="_painting_area_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// ---------- PaintingArea.cpp ----------</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#include "string.h"</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>  </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include <QtWidgets></span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <QPoint></span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <QRect></span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="_painting_area_8h.html">PaintingArea.h</a>"</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="_intelli_raster_image_8h.html">Image/IntelliRasterImage.h</a>"</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "<a class="code" href="_intelli_shaped_image_8h.html">Image/IntelliShapedImage.h</a>"</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_pen_8h.html">Tool/IntelliToolPen.h</a>"</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_plain_8h.html">Tool/IntelliToolPlain.h</a>"</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_line_8h.html">Tool/IntelliToolLine.h</a>"</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_circle_8h.html">Tool/IntelliToolCircle.h</a>"</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_rectangle_8h.html">Tool/IntelliToolRectangle.h</a>"</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_flood_fill_8h.html">Tool/IntelliToolFloodFill.h</a>"</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="_intelli_tool_polygon_8h.html">Tool/IntelliToolPolygon.h</a>"</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  </div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  </div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_painting_area.html#a4fa0ec23e78cc59f28c823584c721460"> 22</a></span> <a class="code" href="class_painting_area.html#a4fa0ec23e78cc59f28c823584c721460">PaintingArea::PaintingArea</a>(<span class="keywordtype">int</span> maxWidth, <span class="keywordtype">int</span> maxHeight, QWidget*parent)</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  : QWidget(parent){</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  this->Tool = <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  this->setLayerDimensions(maxWidth, maxHeight);</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  activeLayer = -1;</div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> }</div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_painting_area.html#aa32adc113f77031945f73e33051931e8"> 30</a></span> <a class="code" href="class_painting_area.html#aa32adc113f77031945f73e33051931e8">PaintingArea::~PaintingArea</a>(){</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">delete</span> Tool;</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> }</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_painting_area.html#a63be0831e5b6ceb8cc622d83aa28f0bd"> 34</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a63be0831e5b6ceb8cc622d83aa28f0bd">PaintingArea::setRenderSettings</a>(<span class="keywordtype">bool</span> isFastRenderingOn){</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordtype">bool</span> ToolIsActive;</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">if</span>(Tool!=<span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  ToolIsActive = Tool-><a class="code" href="class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3">getIsDrawing</a>();</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  }</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">else</span>{</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  ToolIsActive = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  }</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">if</span>(isFastRenderingOn != renderSettings.<a class="code" href="class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073">isFastRenderering</a>() && !ToolIsActive) {</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  renderSettings.<a class="code" href="class_intelli_render_settings.html#a5ffb878b77e5d448ffe4eb03a8397ac2">setFastRendering</a>(isFastRenderingOn);</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span>& layer : layerBundle) {</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  layer.image->updateRendererSetting(isFastRenderingOn);</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  }</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="keywordtype">void</span> PaintingArea::setLayerDimensions(<span class="keywordtype">int</span> maxWidth, <span class="keywordtype">int</span> maxHeight){</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">//set standart parameter</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  this->maxWidth = maxWidth;</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  this->maxHeight = maxHeight;</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  Canvas = <span class="keyword">new</span> QImage(maxWidth,maxHeight, QImage::Format_ARGB32);</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="comment">// Roots the widget to the top left even if resized</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  setAttribute(Qt::WA_StaticContents);</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> }</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  </div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_painting_area.html#a6e9207612cef104d39013564696fe989"> 62</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#a6e9207612cef104d39013564696fe989">PaintingArea::addLayer</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> widthOffset, <span class="keywordtype">int</span> heightOffset, <a class="code" href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680e">IntelliImage::ImageType</a> type){</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="struct_layer_object.html">LayerObject</a> newLayer;</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  updateTools();</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  newLayer.<a class="code" href="struct_layer_object.html#af261813df52ff0b0c82bfa57efeb9897">width</a> = width;</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  newLayer.<a class="code" href="struct_layer_object.html#ae0003fb815e50ed587a9897988befc90">height</a> = height;</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  newLayer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> = widthOffset;</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  newLayer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> = heightOffset;</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">if</span>(type==<a class="code" href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680eadd5823fd73c42c0154fa2abbd70283b9">IntelliImage::ImageType::RASTERIMAGE</a>) {</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  newLayer.<a class="code" href="struct_layer_object.html#af01a139bc8edfdbb338393874e89bd83">image</a> = <span class="keyword">new</span> <a class="code" href="class_intelli_raster_image.html">IntelliRasterImage</a>(width,height,renderSettings.<a class="code" href="class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073">isFastRenderering</a>());</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(type==<a class="code" href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680eac065b60ec4cf443808263527bdc0df37">IntelliImage::ImageType::SHAPEDIMAGE</a>) {</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  newLayer.<a class="code" href="struct_layer_object.html#af01a139bc8edfdbb338393874e89bd83">image</a> = <span class="keyword">new</span> <a class="code" href="class_intelli_shaped_image.html">IntelliShapedImage</a>(width, height, renderSettings.<a class="code" href="class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073">isFastRenderering</a>());</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  newLayer.<a class="code" href="struct_layer_object.html#a402cb1d9f20436032fe080681b80eb56">alpha</a> = 255;</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  this->layerBundle.push_back(newLayer);</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  activeLayer = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size()) - 1;</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> activeLayer;</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> }</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  </div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_painting_area.html#a9b7dc8b8dc0b301ce58206aa76fb1630"> 81</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a9b7dc8b8dc0b301ce58206aa76fb1630">PaintingArea::deleteLayer</a>(<span class="keywordtype">int</span> idx, <span class="keywordtype">bool</span> isTool){</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">if</span>(!isTool) {</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  updateTools();</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">if</span>(idx<<span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())&&idx>=0) {</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  this->layerBundle.erase(layerBundle.begin() + idx);</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">if</span>(activeLayer>=idx) {</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  activeLayer--;</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  }</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordflow">if</span>(activeLayer < 0 && layerBundle.size()) {</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  activeLayer = 0;</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  }</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> }</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  </div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="class_painting_area.html#a1ff0b9c1227531943c9cec2c546fae5e"> 96</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a1ff0b9c1227531943c9cec2c546fae5e">PaintingArea::slotDeleteActiveLayer</a>(){</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">if</span>(activeLayer>=0 && activeLayer < <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())) {</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  this->layerBundle.erase(layerBundle.begin() + activeLayer);</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  activeLayer--;</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> }</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  </div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="class_painting_area.html#a79eb059829f27e8cdb3a54c5cd3d12c9"> 103</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a79eb059829f27e8cdb3a54c5cd3d12c9">PaintingArea::setLayerActive</a>(<span class="keywordtype">int</span> idx){</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  updateTools();</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">if</span>(idx>=0&&idx<<span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())) {</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  this->activeLayer = idx;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  }</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> }</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="class_painting_area.html#a6c7e0865e684ae1089ee283b4399d055"> 110</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a6c7e0865e684ae1089ee283b4399d055">PaintingArea::setLayerAlpha</a>(<span class="keywordtype">int</span> idx, <span class="keywordtype">int</span> alpha){</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">if</span>(idx>=0&&idx<<span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())) {</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">if</span>(alpha>=0 && alpha<=255) {</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(idx)].alpha = alpha;</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  }</div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> }</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_painting_area.html#aa409492ac26483d618bb33616f2e3f81"> 117</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#aa409492ac26483d618bb33616f2e3f81">PaintingArea::setPolygon</a>(<span class="keywordtype">int</span> idx){</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span>(idx>=0&&idx<<span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())) {</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">if</span>(layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(idx)].image->getTypeOfImage()==<a class="code" href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680eac065b60ec4cf443808263527bdc0df37">IntelliImage::ImageType::SHAPEDIMAGE</a>) {</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  this->Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_polygon.html">IntelliToolPolygon</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>,&<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>, <span class="keyword">true</span>);</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  isSettingPolygon = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  this->DummyGui-><a class="code" href="class_intelli_photo_gui.html#a343f8ebf5d27b7242208747de6c92497">setToolWidth</a>(5);</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  }</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> }</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  </div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment">// Used to load the image and place it in the widget</span></div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="class_painting_area.html#a88c7e759aa8375a56129791645f46ea5"> 129</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_painting_area.html#a88c7e759aa8375a56129791645f46ea5">PaintingArea::open</a>(<span class="keyword">const</span> QString &filePath){</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">if</span>(this->activeLayer==-1) {</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="class_intelli_image.html">IntelliImage</a>* active = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)].image;</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">bool</span> <a class="code" href="class_painting_area.html#a88c7e759aa8375a56129791645f46ea5">open</a> = active-><a class="code" href="class_intelli_image.html#ae231800aba38c96074bbe9bb6e341d4e">loadImage</a>(filePath);</div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  active-><a class="code" href="class_intelli_image.html#aebbced93f4744fad81b7f141b21f4ab2">calculateVisiblity</a>();</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  update();</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">return</span> <a class="code" href="class_painting_area.html#a88c7e759aa8375a56129791645f46ea5">open</a>;</div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> }</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  </div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// Save the current image</span></div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="class_painting_area.html#aa2463d4f403224086acab02903ae407e"> 141</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_painting_area.html#aa2463d4f403224086acab02903ae407e">PaintingArea::save</a>(<span class="keyword">const</span> QString &filePath, <span class="keyword">const</span> <span class="keywordtype">char</span>*fileFormat){</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">if</span>(layerBundle.size()==0) {</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  this->drawLayers(<span class="keyword">true</span>);</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">if</span>(!strcmp(fileFormat,<span class="stringliteral">"PNG"</span>)) {</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  QImage visibleImage = Canvas->convertToFormat(QImage::Format_Indexed8);</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  fileFormat = <span class="stringliteral">"png"</span>;</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">if</span> (visibleImage.save(filePath, fileFormat)) {</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  }</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">if</span> (Canvas->save(filePath, fileFormat)) {</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  } <span class="keywordflow">else</span> {</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> }</div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  </div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="class_painting_area.html#ac6d089f4357b22d9a9906fd4771de3e7"> 164</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#ac6d089f4357b22d9a9906fd4771de3e7">PaintingArea::movePositionActive</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y){</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  updateTools();</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)].widthOffset += x;</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)].heightOffset += y;</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> }</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  </div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="class_painting_area.html#ae05f6893fb44bfcb34018573a609cd1a"> 170</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#ae05f6893fb44bfcb34018573a609cd1a">PaintingArea::moveActiveLayer</a>(<span class="keywordtype">int</span> idx){</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  updateTools();</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">if</span>(idx==1) {</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  this->selectLayerUp();</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(idx==-1) {</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  this->selectLayerDown();</div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  DummyGui-><a class="code" href="class_intelli_photo_gui.html#a1dbef8d4688227aa9455aea52db00bf4">UpdateGui</a>();</div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> }</div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  </div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="class_painting_area.html#a71ac281e0de263208d4a3b9de74258ec"> 180</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a71ac281e0de263208d4a3b9de74258ec">PaintingArea::slotActivateLayer</a>(<span class="keywordtype">int</span> a){</div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  updateTools();</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">if</span>(a>=0 && a < <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(layerBundle.size())) {</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  this-><a class="code" href="class_painting_area.html#a79eb059829f27e8cdb3a54c5cd3d12c9">setLayerActive</a>(a);</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  }</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> }</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="class_painting_area.html#a4735d4cf1dc58a9096d904e74c39c4df"> 187</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a4735d4cf1dc58a9096d904e74c39c4df">PaintingArea::colorPickerSetFirstColor</a>(){</div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  QColor clr = QColorDialog::getColor(<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>.<a class="code" href="class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1">getFirstColor</a>(), <span class="keyword">nullptr</span>, <span class="stringliteral">"Main Color"</span>, QColorDialog::DontUseNativeDialog);</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  this-><a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>.<a class="code" href="class_intelli_color_picker.html#a7e2ddbbbfbed383f06b24e5bf6b27ae8">setFirstColor</a>(clr);</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> }</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="class_painting_area.html#ae261acaaa346610dfed489dbac17e789"> 192</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#ae261acaaa346610dfed489dbac17e789">PaintingArea::colorPickerSetSecondColor</a>(){</div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  QColor clr = QColorDialog::getColor(<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>.<a class="code" href="class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0">getSecondColor</a>(), <span class="keyword">nullptr</span>, <span class="stringliteral">"Secondary Color"</span>, QColorDialog::DontUseNativeDialog);</div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  this-><a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>.<a class="code" href="class_intelli_color_picker.html#a86bf4a940e4a0e465e30cbdf28748931">setSecondColor</a>(clr);</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> }</div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  </div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="class_painting_area.html#acff4563d006fda491469bd41778d07eb"> 197</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#acff4563d006fda491469bd41778d07eb">PaintingArea::colorPickerSwapColors</a>(){</div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  this-><a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>.<a class="code" href="class_intelli_color_picker.html#aec499265ae28ce1b54be88222e74292e">swapColors</a>();</div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> }</div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  </div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_painting_area.html#a96c6248e343e44b61cf2625cb6d21353"> 201</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a96c6248e343e44b61cf2625cb6d21353">PaintingArea::createPenTool</a>(){</div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_pen.html">IntelliToolPen</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> }</div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  </div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="class_painting_area.html#a3de83443d2d5cf460ff48d0602070938"> 206</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a3de83443d2d5cf460ff48d0602070938">PaintingArea::createPlainTool</a>(){</div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_plain_tool.html">IntelliToolPlainTool</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> }</div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  </div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="class_painting_area.html#a240c33a7875addac86080cdfb0db036a"> 211</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a240c33a7875addac86080cdfb0db036a">PaintingArea::createLineTool</a>(){</div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_line.html">IntelliToolLine</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span> }</div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="class_painting_area.html#a5b04ce62ce024e307f54e0281f7ae4bd"> 216</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a5b04ce62ce024e307f54e0281f7ae4bd">PaintingArea::createRectangleTool</a>(){</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_rectangle.html">IntelliToolRectangle</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> }</div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  </div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="class_painting_area.html#a2d9f4b3585f7dd1acb11f432ca503466"> 221</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a2d9f4b3585f7dd1acb11f432ca503466">PaintingArea::createCircleTool</a>(){</div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_circle.html">IntelliToolCircle</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> }</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="class_painting_area.html#a13c2f94644bea9c2d3123d0b7898f34b"> 225</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a13c2f94644bea9c2d3123d0b7898f34b">PaintingArea::createPolygonTool</a>(){</div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_polygon.html">IntelliToolPolygon</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> }</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="class_painting_area.html#a0b22e18069b524f3e75857d203baf256"> 230</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a0b22e18069b524f3e75857d203baf256">PaintingArea::createFloodFillTool</a>(){</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  Tool = <span class="keyword">new</span> <a class="code" href="class_intelli_tool_flood_fill.html">IntelliToolFloodFill</a>(<span class="keyword">this</span>, &<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span> }</div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  </div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="class_painting_area.html#a675ee91b26b1c58be6d833f279d81597"> 235</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#a675ee91b26b1c58be6d833f279d81597">PaintingArea::getWidthOfActive</a>(){</div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> this->layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].width;</div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> }</div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  </div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="class_painting_area.html#ac576f58aad03b4dcd47611b6a4b9abb4"> 239</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#ac576f58aad03b4dcd47611b6a4b9abb4">PaintingArea::getHeightOfActive</a>(){</div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordflow">return</span> this->layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].height;</div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> }</div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  </div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="class_painting_area.html#aeb082c1cda3edb6b68d8ee45cf4822f8"> 243</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#aeb082c1cda3edb6b68d8ee45cf4822f8">PaintingArea::getMaxWidth</a>(){</div>
|
|
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keywordflow">return</span> this->maxWidth;</div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> }</div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="class_painting_area.html#aa811d142df9239ae248679bd70ad6da7"> 247</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#aa811d142df9239ae248679bd70ad6da7">PaintingArea::getMaxHeight</a>(){</div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">return</span> this->maxHeight;</div>
|
|
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> }</div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  </div>
|
|
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="class_painting_area.html#ae92b27dfd09573c224d2ae1958d3bead"> 251</a></span> <a class="code" href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680e">IntelliImage::ImageType</a> <a class="code" href="class_painting_area.html#ae92b27dfd09573c224d2ae1958d3bead">PaintingArea::getTypeOfImageRealLayer</a>(){</div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">return</span> this->layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].image->getTypeOfImage();</div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> }</div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  </div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="class_painting_area.html#a7ae21fd031ee1c04f92e042e86be0a90"> 255</a></span> std::vector<QPoint> <a class="code" href="class_painting_area.html#a7ae21fd031ee1c04f92e042e86be0a90">PaintingArea::getPolygonDataOfRealLayer</a>(){</div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">return</span> this->layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].image->getPolygonData();</div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> }</div>
|
|
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  </div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment">// If a mouse button is pressed check if it was the</span></div>
|
|
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="comment">// left button and if so store the current position</span></div>
|
|
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment">// Set that we are currently drawing</span></div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="class_painting_area.html#abfe445f8d9b70ae42bfeda874127dd15"> 262</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#abfe445f8d9b70ae42bfeda874127dd15">PaintingArea::mousePressEvent</a>(QMouseEvent*event){</div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">if</span>(this->activeLayer < 0) {</div>
|
|
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  }</div>
|
|
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">if</span>(Tool == <span class="keyword">nullptr</span>)</div>
|
|
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordtype">int</span> x = <span class="keyword">event</span>->x() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].widthOffset;</div>
|
|
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordtype">int</span> y = <span class="keyword">event</span>->y() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].heightOffset;</div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordflow">if</span>(event->button() == Qt::LeftButton) {</div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  Tool-><a class="code" href="class_intelli_tool.html#a34b7ef1dde96b94a0ce450a25ae1778c">onMouseLeftPressed</a>(x, y);</div>
|
|
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(event->button() == Qt::RightButton) {</div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  Tool-><a class="code" href="class_intelli_tool.html#a1e6aa68ac5f3c2ca02319e5ef3f0c966">onMouseRightPressed</a>(x, y);</div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  }</div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  update();</div>
|
|
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span> }</div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  </div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="comment">// When the mouse moves if the left button is clicked</span></div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <span class="comment">// we call the drawline function which draws a line</span></div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="comment">// from the last position to the current</span></div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="class_painting_area.html#aa22e274b6094a9619f196cd7b49526b5"> 281</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#aa22e274b6094a9619f196cd7b49526b5">PaintingArea::mouseMoveEvent</a>(QMouseEvent*event){</div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">if</span>(this->activeLayer < 0) {</div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  }</div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">if</span>(Tool == <span class="keyword">nullptr</span>)</div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordtype">int</span> x = <span class="keyword">event</span>->x() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].widthOffset;</div>
|
|
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordtype">int</span> y = <span class="keyword">event</span>->y() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].heightOffset;</div>
|
|
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  Tool-><a class="code" href="class_intelli_tool.html#ac10e20414cd8855a2f9b103fb6408639">onMouseMoved</a>(x, y);</div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  update();</div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span> }</div>
|
|
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  </div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="comment">// If the button is released we set variables to stop drawing</span></div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="class_painting_area.html#a35b5df914acb608cc29717659793359c"> 294</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a35b5df914acb608cc29717659793359c">PaintingArea::mouseReleaseEvent</a>(QMouseEvent*event){</div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">if</span>(this->activeLayer < 0)</div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="keywordflow">if</span>(Tool == <span class="keyword">nullptr</span>)</div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordtype">int</span> x = <span class="keyword">event</span>->x() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].widthOffset;</div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keywordtype">int</span> y = <span class="keyword">event</span>->y() - layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)].heightOffset;</div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span>(event->button() == Qt::LeftButton) {</div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  Tool-><a class="code" href="class_intelli_tool.html#a906a2575c16c8a33cb2a5197f8d8cc5b">onMouseLeftReleased</a>(x, y);</div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(event->button() == Qt::RightButton) {</div>
|
|
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  Tool-><a class="code" href="class_intelli_tool.html#a16189b00307c6d7e89f28198f54404b0">onMouseRightReleased</a>(x, y);</div>
|
|
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  }</div>
|
|
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  update();</div>
|
|
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span> }</div>
|
|
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  </div>
|
|
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="class_painting_area.html#a632848d99f44d33d7da2618fbc6775a4"> 309</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a632848d99f44d33d7da2618fbc6775a4">PaintingArea::wheelEvent</a>(QWheelEvent*event){</div>
|
|
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">if</span>(this->activeLayer < 0)</div>
|
|
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordflow">if</span>(this->Tool != <span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  QPoint numDegrees = <span class="keyword">event</span>->angleDelta() / 8;</div>
|
|
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">if</span>(!numDegrees.isNull()) {</div>
|
|
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  QPoint numSteps = numDegrees / 15;</div>
|
|
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  Tool-><a class="code" href="class_intelli_tool.html#a4dccfd4460255ccb866f336406a33574">onWheelScrolled</a>(numSteps.y() * -1);</div>
|
|
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  }</div>
|
|
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div>
|
|
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span> }</div>
|
|
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  </div>
|
|
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span> <span class="comment">// QPainter provides functions to draw on the widget</span></div>
|
|
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="comment">// The QPaintEvent is sent to widgets that need to</span></div>
|
|
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span> <span class="comment">// update themselves</span></div>
|
|
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="class_painting_area.html#a4a8138b9508ee4ec87a7fca9160368a7"> 324</a></span> <span class="keywordtype">void</span> <a class="code" href="class_painting_area.html#a4a8138b9508ee4ec87a7fca9160368a7">PaintingArea::paintEvent</a>(QPaintEvent*event){</div>
|
|
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  this->drawLayers();</div>
|
|
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  </div>
|
|
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  QPainter painter(<span class="keyword">this</span>);</div>
|
|
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  QRect dirtyRec = <span class="keyword">event</span>->rect();</div>
|
|
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  painter.drawImage(dirtyRec, *Canvas, dirtyRec);</div>
|
|
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  update();</div>
|
|
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span> }</div>
|
|
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  </div>
|
|
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> <span class="keywordtype">void</span> PaintingArea::selectLayerUp(){</div>
|
|
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  updateTools();</div>
|
|
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordflow">if</span>(activeLayer != -1 && <span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)<layerBundle.size() - 1) {</div>
|
|
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  std::swap(layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)], layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer + 1)]);</div>
|
|
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  activeLayer++;</div>
|
|
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  }</div>
|
|
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> }</div>
|
|
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  </div>
|
|
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="keywordtype">void</span> PaintingArea::selectLayerDown(){</div>
|
|
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  updateTools();</div>
|
|
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">if</span>(activeLayer>0) {</div>
|
|
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  std::swap(layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer)], layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(activeLayer - 1)]);</div>
|
|
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  activeLayer--;</div>
|
|
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  }</div>
|
|
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span> }</div>
|
|
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  </div>
|
|
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> <span class="keywordtype">void</span> PaintingArea::drawLayers(<span class="keywordtype">bool</span> forSaving){</div>
|
|
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">if</span>(forSaving) {</div>
|
|
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  Canvas->fill(Qt::GlobalColor::transparent);</div>
|
|
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  }<span class="keywordflow">else</span>{</div>
|
|
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  Canvas->fill(Qt::GlobalColor::black);</div>
|
|
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  }</div>
|
|
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i<layerBundle.size(); i++) {</div>
|
|
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="code" href="struct_layer_object.html">LayerObject</a> layer = layerBundle[i];</div>
|
|
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  QImage cpy = layer.<a class="code" href="struct_layer_object.html#af01a139bc8edfdbb338393874e89bd83">image</a>-><a class="code" href="class_intelli_image.html#a21c7e65b59a26db45aac3880133ef21d">getDisplayable</a>(layer.<a class="code" href="struct_layer_object.html#a402cb1d9f20436032fe080681b80eb56">alpha</a>);</div>
|
|
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  QColor clr_0;</div>
|
|
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  QColor clr_1;</div>
|
|
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y<layer.<a class="code" href="struct_layer_object.html#ae0003fb815e50ed587a9897988befc90">height</a>; y++) {</div>
|
|
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordflow">if</span>(layer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> + y<0) <span class="keywordflow">continue</span>;</div>
|
|
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keywordflow">if</span>(layer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> + y>=maxHeight) <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> x = 0; x<layer.<a class="code" href="struct_layer_object.html#af261813df52ff0b0c82bfa57efeb9897">width</a>; x++) {</div>
|
|
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="keywordflow">if</span>(layer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> + x<0) <span class="keywordflow">continue</span>;</div>
|
|
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keywordflow">if</span>(layer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> + x>=maxWidth) <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  clr_0 = Canvas->pixelColor(layer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> + x, layer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> + y);</div>
|
|
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  clr_1 = cpy.pixelColor(x,y);</div>
|
|
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordtype">float</span> t = <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_1.alpha()) / 255.f;</div>
|
|
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordtype">int</span> r = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_1.red()) * (t) + <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_0.red()) * (1.f - t) + 0.5f);</div>
|
|
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keywordtype">int</span> g = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_1.green()) * (t) + <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_0.green()) * (1.f - t) + 0.5f);</div>
|
|
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keywordtype">int</span> b = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_1.blue()) * (t) + <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(clr_0.blue() * (1.f - t)) + 0.5f);</div>
|
|
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordtype">int</span> a = std::min(clr_0.alpha() + clr_1.alpha(), 255);</div>
|
|
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  clr_0.setRed(r);</div>
|
|
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  clr_0.setGreen(g);</div>
|
|
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  clr_0.setBlue(b);</div>
|
|
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  clr_0.setAlpha(a);</div>
|
|
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  </div>
|
|
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  Canvas->setPixelColor(layer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> + x, layer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> + y, clr_0);</div>
|
|
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  }</div>
|
|
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div>
|
|
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  }</div>
|
|
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span> }</div>
|
|
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  </div>
|
|
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> <span class="keywordtype">bool</span> PaintingArea::createTempTopLayer(<span class="keywordtype">int</span> idx){</div>
|
|
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">if</span>(idx>=0) {</div>
|
|
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <a class="code" href="struct_layer_object.html">LayerObject</a> newLayer;</div>
|
|
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  newLayer.<a class="code" href="struct_layer_object.html#a402cb1d9f20436032fe080681b80eb56">alpha</a> = 255;</div>
|
|
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  newLayer.<a class="code" href="struct_layer_object.html#ae0003fb815e50ed587a9897988befc90">height</a> = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(idx)].height;</div>
|
|
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  newLayer.<a class="code" href="struct_layer_object.html#af261813df52ff0b0c82bfa57efeb9897">width</a> = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(idx)].width;</div>
|
|
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  newLayer.<a class="code" href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">heightOffset</a> = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(idx)].heightOffset;</div>
|
|
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  newLayer.<a class="code" href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">widthOffset</a> = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(idx)].widthOffset;</div>
|
|
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  newLayer.<a class="code" href="struct_layer_object.html#af01a139bc8edfdbb338393874e89bd83">image</a> = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span><span class="keyword">></span>(idx)].image->getDeepCopy();</div>
|
|
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  layerBundle.insert(layerBundle.begin() + idx + 1,newLayer);</div>
|
|
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  }</div>
|
|
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span> }</div>
|
|
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  </div>
|
|
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> <a class="code" href="class_intelli_tool.html">IntelliTool</a>* PaintingArea::copyActiveTool(){</div>
|
|
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <span class="keywordflow">switch</span>(Tool-><a class="code" href="class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694">getTooltype</a>()) {</div>
|
|
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa0af50777920c1401ab975cab64c4d491">IntelliTool::Tooltype::CIRCLE</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_circle.html">IntelliToolCircle</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa526904ea67131c56718f9882518b5d93">IntelliTool::Tooltype::FLOODFILL</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_flood_fill.html">IntelliToolFloodFill</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa17b8ef2c330f1430e00c9de5469fc7e7">IntelliTool::Tooltype::LINE</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_line.html">IntelliToolLine</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fad3fa1aa45b9fe56e1fc1b558d8ed6678">IntelliTool::Tooltype::PEN</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_pen.html">IntelliToolPen</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8faf62eb0bf5e5c72e80983fbbac1cb70e5">IntelliTool::Tooltype::PLAIN</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_plain_tool.html">IntelliToolPlainTool</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8faecdc92bf56d960b73b02ee40125758bc">IntelliTool::Tooltype::POLYGON</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_polygon.html">IntelliToolPolygon</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keywordflow">case</span> <a class="code" href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa8e8e58fe94ab307a826e087028a7c01a">IntelliTool::Tooltype::RECTANGLE</a>: <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_intelli_tool_rectangle.html">IntelliToolRectangle</a>(<span class="keyword">this</span>,&<a class="code" href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">colorPicker</a>, &<a class="code" href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">Toolsettings</a>);</div>
|
|
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">default</span>: <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  }</div>
|
|
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span> }</div>
|
|
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  </div>
|
|
<div class="line"><a name="l00412"></a><span class="lineno"><a class="line" href="class_painting_area.html#a24280454ebb80db7feba2fd621513353"> 412</a></span> <span class="keywordtype">int</span> <a class="code" href="class_painting_area.html#a24280454ebb80db7feba2fd621513353">PaintingArea::getNumberOfActiveLayer</a>(){</div>
|
|
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="keywordflow">return</span> activeLayer;</div>
|
|
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> }</div>
|
|
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  </div>
|
|
<div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="class_painting_area.html#acab11ad35d07e9081203d8217d2c0855"> 416</a></span> <a class="code" href="class_intelli_image.html">IntelliImage</a>* <a class="code" href="class_painting_area.html#acab11ad35d07e9081203d8217d2c0855">PaintingArea::getImageOfActiveLayer</a>(){</div>
|
|
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">if</span>(activeLayer<0) {</div>
|
|
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  }</div>
|
|
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordflow">return</span> layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)].image;</div>
|
|
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span> }</div>
|
|
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  </div>
|
|
<div class="line"><a name="l00423"></a><span class="lineno"><a class="line" href="class_painting_area.html#a4f484ff3ca7ae202ab57a00f52551423"> 423</a></span> QImage <a class="code" href="class_painting_area.html#a4f484ff3ca7ae202ab57a00f52551423">PaintingArea::getImageDataOfActiveLayer</a>(){</div>
|
|
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  QImage returnImage;</div>
|
|
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <span class="keywordflow">if</span>(activeLayer<0) {</div>
|
|
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  returnImage = QImage(QSize(10,10),QImage::Format_ARGB32);</div>
|
|
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  returnImage.fill(QColor(255,255,255,255));</div>
|
|
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  }</div>
|
|
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordflow">else</span>{</div>
|
|
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  returnImage = layerBundle[<span class="keyword">static_cast<</span><span class="keywordtype">size_t</span><span class="keyword">></span>(activeLayer)].image->getImageData();</div>
|
|
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keywordflow">if</span>(renderSettings.<a class="code" href="class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073">isFastRenderering</a>()) {</div>
|
|
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  returnImage = returnImage.convertToFormat(QImage::Format_ARGB32);</div>
|
|
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  }</div>
|
|
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  }</div>
|
|
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordflow">return</span> returnImage;</div>
|
|
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span> }</div>
|
|
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  </div>
|
|
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span> <span class="keywordtype">void</span> PaintingArea::updateTools(){</div>
|
|
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">if</span>(Tool!=<span class="keyword">nullptr</span>) {</div>
|
|
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordflow">if</span>(Tool-><a class="code" href="class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3">getIsDrawing</a>()) {</div>
|
|
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <a class="code" href="class_intelli_tool.html">IntelliTool</a>* temp = copyActiveTool();</div>
|
|
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  this->Tool = temp;</div>
|
|
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  }</div>
|
|
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">if</span>(isSettingPolygon) {</div>
|
|
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keyword">delete</span> this->Tool;</div>
|
|
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  this->Tool = <span class="keyword">nullptr</span>;</div>
|
|
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  isSettingPolygon = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  }</div>
|
|
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  }</div>
|
|
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span> }</div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div class="ttc" id="aclass_painting_area_html_a675ee91b26b1c58be6d833f279d81597"><div class="ttname"><a href="class_painting_area.html#a675ee91b26b1c58be6d833f279d81597">PaintingArea::getWidthOfActive</a></div><div class="ttdeci">int getWidthOfActive()</div><div class="ttdoc">The getWidthOfActive gets the horizontal dimensions of the active layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00235">PaintingArea.cpp:235</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8fad3fa1aa45b9fe56e1fc1b558d8ed6678"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fad3fa1aa45b9fe56e1fc1b558d8ed6678">IntelliTool::Tooltype::PEN</a></div><div class="ttdeci">@ PEN</div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a2d9f4b3585f7dd1acb11f432ca503466"><div class="ttname"><a href="class_painting_area.html#a2d9f4b3585f7dd1acb11f432ca503466">PaintingArea::createCircleTool</a></div><div class="ttdeci">void createCircleTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00221">PaintingArea.cpp:221</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a1e6aa68ac5f3c2ca02319e5ef3f0c966"><div class="ttname"><a href="class_intelli_tool.html#a1e6aa68ac5f3c2ca02319e5ef3f0c966">IntelliTool::onMouseRightPressed</a></div><div class="ttdeci">virtual void onMouseRightPressed(int x, int y)</div><div class="ttdoc">A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on....</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00018">IntelliTool.cpp:18</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_color_picker_html_aeb08029a0c946ed0402c9c11a91965b1"><div class="ttname"><a href="class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1">IntelliColorPicker::getFirstColor</a></div><div class="ttdeci">QColor getFirstColor() const</div><div class="ttdoc">A function to read the primary selected color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_color_picker_8cpp_source.html#l00015">IntelliColorPicker.cpp:15</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a906a2575c16c8a33cb2a5197f8d8cc5b"><div class="ttname"><a href="class_intelli_tool.html#a906a2575c16c8a33cb2a5197f8d8cc5b">IntelliTool::onMouseLeftReleased</a></div><div class="ttdeci">virtual void onMouseLeftReleased(int x, int y)</div><div class="ttdoc">A function managing the left click Released of a Mouse. Call this in child classes!</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00036">IntelliTool.cpp:36</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a63be0831e5b6ceb8cc622d83aa28f0bd"><div class="ttname"><a href="class_painting_area.html#a63be0831e5b6ceb8cc622d83aa28f0bd">PaintingArea::setRenderSettings</a></div><div class="ttdeci">void setRenderSettings(bool isFastRenderingOn)</div><div class="ttdoc">setRenderSettings updates all Images to the new Rendersetting.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00034">PaintingArea.cpp:34</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_acab11ad35d07e9081203d8217d2c0855"><div class="ttname"><a href="class_painting_area.html#acab11ad35d07e9081203d8217d2c0855">PaintingArea::getImageOfActiveLayer</a></div><div class="ttdeci">IntelliImage * getImageOfActiveLayer()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00416">PaintingArea.cpp:416</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a35b5df914acb608cc29717659793359c"><div class="ttname"><a href="class_painting_area.html#a35b5df914acb608cc29717659793359c">PaintingArea::mouseReleaseEvent</a></div><div class="ttdeci">void mouseReleaseEvent(QMouseEvent *event) override</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00294">PaintingArea.cpp:294</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a5b04ce62ce024e307f54e0281f7ae4bd"><div class="ttname"><a href="class_painting_area.html#a5b04ce62ce024e307f54e0281f7ae4bd">PaintingArea::createRectangleTool</a></div><div class="ttdeci">void createRectangleTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00216">PaintingArea.cpp:216</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_polygon_8h_html"><div class="ttname"><a href="_intelli_tool_polygon_8h.html">IntelliToolPolygon.h</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a34b7ef1dde96b94a0ce450a25ae1778c"><div class="ttname"><a href="class_intelli_tool.html#a34b7ef1dde96b94a0ce450a25ae1778c">IntelliTool::onMouseLeftPressed</a></div><div class="ttdeci">virtual void onMouseLeftPressed(int x, int y)</div><div class="ttdoc">A function managing the left click Pressed of a Mouse. Resetting the current draw....</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00029">IntelliTool.cpp:29</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_af90f0965efbc5c25126691e998f39ca3"><div class="ttname"><a href="class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3">IntelliTool::getIsDrawing</a></div><div class="ttdeci">bool getIsDrawing() const</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00103">IntelliTool.cpp:103</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aeb082c1cda3edb6b68d8ee45cf4822f8"><div class="ttname"><a href="class_painting_area.html#aeb082c1cda3edb6b68d8ee45cf4822f8">PaintingArea::getMaxWidth</a></div><div class="ttdeci">int getMaxWidth()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00243">PaintingArea.cpp:243</a></div></div>
|
|
<div class="ttc" id="a_intelli_shaped_image_8h_html"><div class="ttname"><a href="_intelli_shaped_image_8h.html">IntelliShapedImage.h</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_render_settings_html_a38fd592c4948d2e47b95bb6fabc34073"><div class="ttname"><a href="class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073">IntelliRenderSettings::isFastRenderering</a></div><div class="ttdeci">bool isFastRenderering() const</div><div class="ttdoc">The getfastRenderer gets the value of the flag for the fastRenderer setting.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_render_settings_8cpp_source.html#l00012">IntelliRenderSettings.cpp:12</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aa2463d4f403224086acab02903ae407e"><div class="ttname"><a href="class_painting_area.html#aa2463d4f403224086acab02903ae407e">PaintingArea::save</a></div><div class="ttdeci">bool save(const QString &filePath, const char *fileFormat)</div><div class="ttdoc">The save method is used for exporting the current project as one picture.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00141">PaintingArea.cpp:141</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_adf5c06ad2b2c0d745fb68cf80e7e5694"><div class="ttname"><a href="class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694">IntelliTool::getTooltype</a></div><div class="ttdeci">Tooltype getTooltype() const</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00099">IntelliTool.cpp:99</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a6c7e0865e684ae1089ee283b4399d055"><div class="ttname"><a href="class_painting_area.html#a6c7e0865e684ae1089ee283b4399d055">PaintingArea::setLayerAlpha</a></div><div class="ttdeci">void setLayerAlpha(int idx, int alpha)</div><div class="ttdoc">The setAlphaOfLayer method sets the alpha value of a specific layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00110">PaintingArea.cpp:110</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8fa526904ea67131c56718f9882518b5d93"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa526904ea67131c56718f9882518b5d93">IntelliTool::Tooltype::FLOODFILL</a></div><div class="ttdeci">@ FLOODFILL</div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a79eb059829f27e8cdb3a54c5cd3d12c9"><div class="ttname"><a href="class_painting_area.html#a79eb059829f27e8cdb3a54c5cd3d12c9">PaintingArea::setLayerActive</a></div><div class="ttdeci">void setLayerActive(int idx)</div><div class="ttdoc">The setLayerToActive method marks a specific layer as active.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00103">PaintingArea.cpp:103</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_a72b44d27c7bbb60dde14f04ec240ab96"><div class="ttname"><a href="struct_layer_object.html#a72b44d27c7bbb60dde14f04ec240ab96">LayerObject::widthOffset</a></div><div class="ttdeci">int widthOffset</div><div class="ttdoc">widthOffset - Stores the number of pixles from the left side of the painting area.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00039">PaintingArea.h:39</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aa811d142df9239ae248679bd70ad6da7"><div class="ttname"><a href="class_painting_area.html#aa811d142df9239ae248679bd70ad6da7">PaintingArea::getMaxHeight</a></div><div class="ttdeci">int getMaxHeight()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00247">PaintingArea.cpp:247</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a9b7dc8b8dc0b301ce58206aa76fb1630"><div class="ttname"><a href="class_painting_area.html#a9b7dc8b8dc0b301ce58206aa76fb1630">PaintingArea::deleteLayer</a></div><div class="ttdeci">void deleteLayer(int idx, bool isTool=false)</div><div class="ttdoc">The deleteLayer method removes a layer at a given idx.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00081">PaintingArea.cpp:81</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_plain_tool_html"><div class="ttname"><a href="class_intelli_tool_plain_tool.html">IntelliToolPlainTool</a></div><div class="ttdoc">The IntelliToolPlainTool class represents a tool to fill the whole canvas with one color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_plain_8h_source.html#l00013">IntelliToolPlain.h:13</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_color_picker_html_a86bf4a940e4a0e465e30cbdf28748931"><div class="ttname"><a href="class_intelli_color_picker.html#a86bf4a940e4a0e465e30cbdf28748931">IntelliColorPicker::setSecondColor</a></div><div class="ttdeci">void setSecondColor(QColor Color)</div><div class="ttdoc">A function to set the secondary color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_color_picker_8cpp_source.html#l00027">IntelliColorPicker.cpp:27</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_shaped_image_html"><div class="ttname"><a href="class_intelli_shaped_image.html">IntelliShapedImage</a></div><div class="ttdoc">The IntelliShapedImage manages a Shapedimage.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_shaped_image_8h_source.html#l00013">IntelliShapedImage.h:13</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_a08bacdcd64a0ae0eb5376f55329954bc"><div class="ttname"><a href="struct_layer_object.html#a08bacdcd64a0ae0eb5376f55329954bc">LayerObject::heightOffset</a></div><div class="ttdeci">int heightOffset</div><div class="ttdoc">heightOffset - Stores the number of pixles from the top of the painting area.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00043">PaintingArea.h:43</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_ac576f58aad03b4dcd47611b6a4b9abb4"><div class="ttname"><a href="class_painting_area.html#ac576f58aad03b4dcd47611b6a4b9abb4">PaintingArea::getHeightOfActive</a></div><div class="ttdeci">int getHeightOfActive()</div><div class="ttdoc">The getHeightOfActive gets the vertical dimensions of the active layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00239">PaintingArea.cpp:239</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_flood_fill_8h_html"><div class="ttname"><a href="_intelli_tool_flood_fill_8h.html">IntelliToolFloodFill.h</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_a21c7e65b59a26db45aac3880133ef21d"><div class="ttname"><a href="class_intelli_image.html#a21c7e65b59a26db45aac3880133ef21d">IntelliImage::getDisplayable</a></div><div class="ttdeci">virtual QImage getDisplayable(const QSize &displaySize, int alpha)=0</div><div class="ttdoc">A function returning the displayable ImageData in a requested transparence and size.</div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a3de83443d2d5cf460ff48d0602070938"><div class="ttname"><a href="class_painting_area.html#a3de83443d2d5cf460ff48d0602070938">PaintingArea::createPlainTool</a></div><div class="ttdeci">void createPlainTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00206">PaintingArea.cpp:206</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a632848d99f44d33d7da2618fbc6775a4"><div class="ttname"><a href="class_painting_area.html#a632848d99f44d33d7da2618fbc6775a4">PaintingArea::wheelEvent</a></div><div class="ttdeci">void wheelEvent(QWheelEvent *event) override</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00309">PaintingArea.cpp:309</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html"><div class="ttname"><a href="struct_layer_object.html">LayerObject</a></div><div class="ttdoc">The LayerObject struct holds all the information needed to construct a layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00023">PaintingArea.h:23</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a96c6248e343e44b61cf2625cb6d21353"><div class="ttname"><a href="class_painting_area.html#a96c6248e343e44b61cf2625cb6d21353">PaintingArea::createPenTool</a></div><div class="ttdeci">void createPenTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00201">PaintingArea.cpp:201</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_plain_8h_html"><div class="ttname"><a href="_intelli_tool_plain_8h.html">IntelliToolPlain.h</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_abfe445f8d9b70ae42bfeda874127dd15"><div class="ttname"><a href="class_painting_area.html#abfe445f8d9b70ae42bfeda874127dd15">PaintingArea::mousePressEvent</a></div><div class="ttdeci">void mousePressEvent(QMouseEvent *event) override</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00262">PaintingArea.cpp:262</a></div></div>
|
|
<div class="ttc" id="a_intelli_raster_image_8h_html"><div class="ttname"><a href="_intelli_raster_image_8h.html">IntelliRasterImage.h</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_a402cb1d9f20436032fe080681b80eb56"><div class="ttname"><a href="struct_layer_object.html#a402cb1d9f20436032fe080681b80eb56">LayerObject::alpha</a></div><div class="ttdeci">int alpha</div><div class="ttdoc">alpha - Stores the alpha value of the layer (default=255).</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00047">PaintingArea.h:47</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_color_picker_html_ab41abe8fb7e184db2c33e792f09792e0"><div class="ttname"><a href="class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0">IntelliColorPicker::getSecondColor</a></div><div class="ttdeci">QColor getSecondColor() const</div><div class="ttdoc">A function to read the secondary selected color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_color_picker_8cpp_source.html#l00019">IntelliColorPicker.cpp:19</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_rectangle_html"><div class="ttname"><a href="class_intelli_tool_rectangle.html">IntelliToolRectangle</a></div><div class="ttdoc">The IntelliToolRectangle class represents a tool to draw a rectangle.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_rectangle_8h_source.html#l00015">IntelliToolRectangle.h:15</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a240c33a7875addac86080cdfb0db036a"><div class="ttname"><a href="class_painting_area.html#a240c33a7875addac86080cdfb0db036a">PaintingArea::createLineTool</a></div><div class="ttdeci">void createLineTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00211">PaintingArea.cpp:211</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_line_8h_html"><div class="ttname"><a href="_intelli_tool_line_8h.html">IntelliToolLine.h</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_pen_html"><div class="ttname"><a href="class_intelli_tool_pen.html">IntelliToolPen</a></div><div class="ttdoc">The IntelliToolPen class represents a tool to draw a line.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_pen_8h_source.html#l00014">IntelliToolPen.h:14</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_ae261acaaa346610dfed489dbac17e789"><div class="ttname"><a href="class_painting_area.html#ae261acaaa346610dfed489dbac17e789">PaintingArea::colorPickerSetSecondColor</a></div><div class="ttdeci">void colorPickerSetSecondColor()</div><div class="ttdoc">The colorPickerSetSecondColor calls the QTColorPicker to determine the secondary drawing color.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00192">PaintingArea.cpp:192</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a16189b00307c6d7e89f28198f54404b0"><div class="ttname"><a href="class_intelli_tool.html#a16189b00307c6d7e89f28198f54404b0">IntelliTool::onMouseRightReleased</a></div><div class="ttdeci">virtual void onMouseRightReleased(int x, int y)</div><div class="ttdoc">A function managing the right click Released of a Mouse. Merging the Canvas to Active....</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00025">IntelliTool.cpp:25</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a4735d4cf1dc58a9096d904e74c39c4df"><div class="ttname"><a href="class_painting_area.html#a4735d4cf1dc58a9096d904e74c39c4df">PaintingArea::colorPickerSetFirstColor</a></div><div class="ttdeci">void colorPickerSetFirstColor()</div><div class="ttdoc">The colorPickerSetFirstColor calls the QTColorPicker to determine the primary drawing color.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00187">PaintingArea.cpp:187</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8faf62eb0bf5e5c72e80983fbbac1cb70e5"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8faf62eb0bf5e5c72e80983fbbac1cb70e5">IntelliTool::Tooltype::PLAIN</a></div><div class="ttdeci">@ PLAIN</div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8faecdc92bf56d960b73b02ee40125758bc"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8faecdc92bf56d960b73b02ee40125758bc">IntelliTool::Tooltype::POLYGON</a></div><div class="ttdeci">@ POLYGON</div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_ae92b27dfd09573c224d2ae1958d3bead"><div class="ttname"><a href="class_painting_area.html#ae92b27dfd09573c224d2ae1958d3bead">PaintingArea::getTypeOfImageRealLayer</a></div><div class="ttdeci">IntelliImage::ImageType getTypeOfImageRealLayer()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00251">PaintingArea.cpp:251</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_af261813df52ff0b0c82bfa57efeb9897"><div class="ttname"><a href="struct_layer_object.html#af261813df52ff0b0c82bfa57efeb9897">LayerObject::width</a></div><div class="ttdeci">int width</div><div class="ttdoc">width - Stores the width of a layer in pixels.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00031">PaintingArea.h:31</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_rectangle_8h_html"><div class="ttname"><a href="_intelli_tool_rectangle_8h.html">IntelliToolRectangle.h</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aa32adc113f77031945f73e33051931e8"><div class="ttname"><a href="class_painting_area.html#aa32adc113f77031945f73e33051931e8">PaintingArea::~PaintingArea</a></div><div class="ttdeci">~PaintingArea() override</div><div class="ttdoc">This deconstructor is used to clear up the memory and remove the currently active window.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00030">PaintingArea.cpp:30</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aa22e274b6094a9619f196cd7b49526b5"><div class="ttname"><a href="class_painting_area.html#aa22e274b6094a9619f196cd7b49526b5">PaintingArea::mouseMoveEvent</a></div><div class="ttdeci">void mouseMoveEvent(QMouseEvent *event) override</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00281">PaintingArea.cpp:281</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a24280454ebb80db7feba2fd621513353"><div class="ttname"><a href="class_painting_area.html#a24280454ebb80db7feba2fd621513353">PaintingArea::getNumberOfActiveLayer</a></div><div class="ttdeci">int getNumberOfActiveLayer()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00412">PaintingArea.cpp:412</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_color_picker_html_a7e2ddbbbfbed383f06b24e5bf6b27ae8"><div class="ttname"><a href="class_intelli_color_picker.html#a7e2ddbbbfbed383f06b24e5bf6b27ae8">IntelliColorPicker::setFirstColor</a></div><div class="ttdeci">void setFirstColor(QColor Color)</div><div class="ttdoc">A function to set the primary color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_color_picker_8cpp_source.html#l00023">IntelliColorPicker.cpp:23</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html"><div class="ttname"><a href="class_intelli_tool.html">IntelliTool</a></div><div class="ttdoc">An abstract class that manages the basic events, like mouse clicks or scrolls events.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8h_source.html#l00017">IntelliTool.h:17</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_a5274ce9fcdcb2659c148e7ff916b680eac065b60ec4cf443808263527bdc0df37"><div class="ttname"><a href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680eac065b60ec4cf443808263527bdc0df37">IntelliImage::ImageType::SHAPEDIMAGE</a></div><div class="ttdeci">@ SHAPEDIMAGE</div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a1ff0b9c1227531943c9cec2c546fae5e"><div class="ttname"><a href="class_painting_area.html#a1ff0b9c1227531943c9cec2c546fae5e">PaintingArea::slotDeleteActiveLayer</a></div><div class="ttdeci">void slotDeleteActiveLayer()</div><div class="ttdoc">The slotDeleteActiveLayer method handles the deletion of the active layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00096">PaintingArea.cpp:96</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_photo_gui_html_a343f8ebf5d27b7242208747de6c92497"><div class="ttname"><a href="class_intelli_photo_gui.html#a343f8ebf5d27b7242208747de6c92497">IntelliPhotoGui::setToolWidth</a></div><div class="ttdeci">void setToolWidth(int value)</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_photo_gui_8cpp_source.html#l00827">IntelliPhotoGui.cpp:827</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a88c7e759aa8375a56129791645f46ea5"><div class="ttname"><a href="class_painting_area.html#a88c7e759aa8375a56129791645f46ea5">PaintingArea::open</a></div><div class="ttdeci">bool open(const QString &filePath)</div><div class="ttdoc">The open method is used for loading a picture into the current layer.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00129">PaintingArea.cpp:129</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a13c2f94644bea9c2d3123d0b7898f34b"><div class="ttname"><a href="class_painting_area.html#a13c2f94644bea9c2d3123d0b7898f34b">PaintingArea::createPolygonTool</a></div><div class="ttdeci">void createPolygonTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00225">PaintingArea.cpp:225</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_ae05f6893fb44bfcb34018573a609cd1a"><div class="ttname"><a href="class_painting_area.html#ae05f6893fb44bfcb34018573a609cd1a">PaintingArea::moveActiveLayer</a></div><div class="ttdeci">void moveActiveLayer(int idx)</div><div class="ttdoc">The moveActiveLayer moves the active layer to a specific position in the layer stack.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00170">PaintingArea.cpp:170</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a132535c4e16052c1472cf1b9f3e096ed"><div class="ttname"><a href="class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed">PaintingArea::colorPicker</a></div><div class="ttdeci">IntelliColorPicker colorPicker</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00202">PaintingArea.h:202</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a4fa0ec23e78cc59f28c823584c721460"><div class="ttname"><a href="class_painting_area.html#a4fa0ec23e78cc59f28c823584c721460">PaintingArea::PaintingArea</a></div><div class="ttdeci">PaintingArea(int maxWidth=600, int maxHeight=600, QWidget *parent=nullptr)</div><div class="ttdoc">PaintingArea is the constructor of the PaintingArea class, which initiates the working environment.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00022">PaintingArea.cpp:22</a></div></div>
|
|
<div class="ttc" id="a_painting_area_8h_html"><div class="ttname"><a href="_painting_area_8h.html">PaintingArea.h</a></div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_ae0003fb815e50ed587a9897988befc90"><div class="ttname"><a href="struct_layer_object.html#ae0003fb815e50ed587a9897988befc90">LayerObject::height</a></div><div class="ttdeci">int height</div><div class="ttdoc">height - Stores the height of a layer in pixels.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00035">PaintingArea.h:35</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a4f484ff3ca7ae202ab57a00f52551423"><div class="ttname"><a href="class_painting_area.html#a4f484ff3ca7ae202ab57a00f52551423">PaintingArea::getImageDataOfActiveLayer</a></div><div class="ttdeci">QImage getImageDataOfActiveLayer()</div><div class="ttdoc">getImageDataOfActiveLayer used to get the currents active imageData (if there isn't any active layer ...</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00423">PaintingArea.cpp:423</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a0b22e18069b524f3e75857d203baf256"><div class="ttname"><a href="class_painting_area.html#a0b22e18069b524f3e75857d203baf256">PaintingArea::createFloodFillTool</a></div><div class="ttdeci">void createFloodFillTool()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00230">PaintingArea.cpp:230</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a71ac281e0de263208d4a3b9de74258ec"><div class="ttname"><a href="class_painting_area.html#a71ac281e0de263208d4a3b9de74258ec">PaintingArea::slotActivateLayer</a></div><div class="ttdeci">void slotActivateLayer(int a)</div><div class="ttdoc">The slotActivateLayer method handles the event of selecting one layer as active.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00180">PaintingArea.cpp:180</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a4a8138b9508ee4ec87a7fca9160368a7"><div class="ttname"><a href="class_painting_area.html#a4a8138b9508ee4ec87a7fca9160368a7">PaintingArea::paintEvent</a></div><div class="ttdeci">void paintEvent(QPaintEvent *event) override</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00324">PaintingArea.cpp:324</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_render_settings_html_a5ffb878b77e5d448ffe4eb03a8397ac2"><div class="ttname"><a href="class_intelli_render_settings.html#a5ffb878b77e5d448ffe4eb03a8397ac2">IntelliRenderSettings::setFastRendering</a></div><div class="ttdeci">void setFastRendering(bool Updatedsetting)</div><div class="ttdoc">setFastRendering sets fastRendering to Updatedsetting.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_render_settings_8cpp_source.html#l00008">IntelliRenderSettings.cpp:8</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_photo_gui_html_a1dbef8d4688227aa9455aea52db00bf4"><div class="ttname"><a href="class_intelli_photo_gui.html#a1dbef8d4688227aa9455aea52db00bf4">IntelliPhotoGui::UpdateGui</a></div><div class="ttdeci">void UpdateGui()</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_photo_gui_8cpp_source.html#l00836">IntelliPhotoGui.cpp:836</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_a5274ce9fcdcb2659c148e7ff916b680eadd5823fd73c42c0154fa2abbd70283b9"><div class="ttname"><a href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680eadd5823fd73c42c0154fa2abbd70283b9">IntelliImage::ImageType::RASTERIMAGE</a></div><div class="ttdeci">@ RASTERIMAGE</div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8fa8e8e58fe94ab307a826e087028a7c01a"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa8e8e58fe94ab307a826e087028a7c01a">IntelliTool::Tooltype::RECTANGLE</a></div><div class="ttdeci">@ RECTANGLE</div></div>
|
|
<div class="ttc" id="astruct_layer_object_html_af01a139bc8edfdbb338393874e89bd83"><div class="ttname"><a href="struct_layer_object.html#af01a139bc8edfdbb338393874e89bd83">LayerObject::image</a></div><div class="ttdeci">IntelliImage * image</div><div class="ttdoc">image - Stores the imageData of the current LayerObject.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00027">PaintingArea.h:27</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_ae231800aba38c96074bbe9bb6e341d4e"><div class="ttname"><a href="class_intelli_image.html#ae231800aba38c96074bbe9bb6e341d4e">IntelliImage::loadImage</a></div><div class="ttdeci">virtual bool loadImage(const QString &filePath)</div><div class="ttdoc">A function that loads and sclaes an image to the fitting dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_image_8cpp_source.html#l00022">IntelliImage.cpp:22</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a7ae21fd031ee1c04f92e042e86be0a90"><div class="ttname"><a href="class_painting_area.html#a7ae21fd031ee1c04f92e042e86be0a90">PaintingArea::getPolygonDataOfRealLayer</a></div><div class="ttdeci">std::vector< QPoint > getPolygonDataOfRealLayer()</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00255">PaintingArea.cpp:255</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_abc2f798744f1dc805a651731eb1692ea"><div class="ttname"><a href="class_painting_area.html#abc2f798744f1dc805a651731eb1692ea">PaintingArea::Toolsettings</a></div><div class="ttdeci">IntelliToolsettings Toolsettings</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8h_source.html#l00201">PaintingArea.h:201</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_aa409492ac26483d618bb33616f2e3f81"><div class="ttname"><a href="class_painting_area.html#aa409492ac26483d618bb33616f2e3f81">PaintingArea::setPolygon</a></div><div class="ttdeci">void setPolygon(int idx)</div><div class="ttdoc">setPolygon is used for setting polygondata, it only works on RASTER images</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00117">PaintingArea.cpp:117</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8fa17b8ef2c330f1430e00c9de5469fc7e7"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa17b8ef2c330f1430e00c9de5469fc7e7">IntelliTool::Tooltype::LINE</a></div><div class="ttdeci">@ LINE</div></div>
|
|
<div class="ttc" id="aclass_intelli_color_picker_html_aec499265ae28ce1b54be88222e74292e"><div class="ttname"><a href="class_intelli_color_picker.html#aec499265ae28ce1b54be88222e74292e">IntelliColorPicker::swapColors</a></div><div class="ttdeci">void swapColors()</div><div class="ttdoc">A function switching primary and secondary color.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_color_picker_8cpp_source.html#l00011">IntelliColorPicker.cpp:11</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_flood_fill_html"><div class="ttname"><a href="class_intelli_tool_flood_fill.html">IntelliToolFloodFill</a></div><div class="ttdoc">The IntelliToolFloodFill class represents a tool to flood FIll a certian area.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_flood_fill_8h_source.html#l00014">IntelliToolFloodFill.h:14</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_acff4563d006fda491469bd41778d07eb"><div class="ttname"><a href="class_painting_area.html#acff4563d006fda491469bd41778d07eb">PaintingArea::colorPickerSwapColors</a></div><div class="ttdeci">void colorPickerSwapColors()</div><div class="ttdoc">The colorPickerSwitchColor swaps the primary color with the secondary drawing color.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00197">PaintingArea.cpp:197</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_pen_8h_html"><div class="ttname"><a href="_intelli_tool_pen_8h.html">IntelliToolPen.h</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_circle_html"><div class="ttname"><a href="class_intelli_tool_circle.html">IntelliToolCircle</a></div><div class="ttdoc">The IntelliToolCircle class represents a tool to draw a circle.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_circle_8h_source.html#l00014">IntelliToolCircle.h:14</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_ac6d089f4357b22d9a9906fd4771de3e7"><div class="ttname"><a href="class_painting_area.html#ac6d089f4357b22d9a9906fd4771de3e7">PaintingArea::movePositionActive</a></div><div class="ttdeci">void movePositionActive(int x, int y)</div><div class="ttdoc">The movePositionActive method moves the active layer to certain position.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00164">PaintingArea.cpp:164</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html"><div class="ttname"><a href="class_intelli_image.html">IntelliImage</a></div><div class="ttdoc">An abstract class which manages the basic IntelliImage operations.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_image_8h_source.html#l00022">IntelliImage.h:22</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_ac10e20414cd8855a2f9b103fb6408639"><div class="ttname"><a href="class_intelli_tool.html#ac10e20414cd8855a2f9b103fb6408639">IntelliTool::onMouseMoved</a></div><div class="ttdeci">virtual void onMouseMoved(int x, int y)</div><div class="ttdoc">A function managing the mouse moved event. Call this in child classes!</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00046">IntelliTool.cpp:46</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_polygon_html"><div class="ttname"><a href="class_intelli_tool_polygon.html">IntelliToolPolygon</a></div><div class="ttdoc">The IntelliToolPolygon managed the Drawing of Polygonforms.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_polygon_8h_source.html#l00015">IntelliToolPolygon.h:15</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_aebbced93f4744fad81b7f141b21f4ab2"><div class="ttname"><a href="class_intelli_image.html#aebbced93f4744fad81b7f141b21f4ab2">IntelliImage::calculateVisiblity</a></div><div class="ttdeci">virtual void calculateVisiblity()=0</div><div class="ttdoc">An abstract function that calculates the visiblity of the Image data if needed.</div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a4dccfd4460255ccb866f336406a33574"><div class="ttname"><a href="class_intelli_tool.html#a4dccfd4460255ccb866f336406a33574">IntelliTool::onWheelScrolled</a></div><div class="ttdeci">virtual void onWheelScrolled(int value)</div><div class="ttdoc">A function managing the scroll event. A positive value means scrolling outwards. Call this in child c...</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_8cpp_source.html#l00051">IntelliTool.cpp:51</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_raster_image_html"><div class="ttname"><a href="class_intelli_raster_image.html">IntelliRasterImage</a></div><div class="ttdoc">The IntelliRasterImage manages a RASTERIMAGE.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_raster_image_8h_source.html#l00012">IntelliRasterImage.h:12</a></div></div>
|
|
<div class="ttc" id="a_intelli_tool_circle_8h_html"><div class="ttname"><a href="_intelli_tool_circle_8h.html">IntelliToolCircle.h</a></div></div>
|
|
<div class="ttc" id="aclass_painting_area_html_a6e9207612cef104d39013564696fe989"><div class="ttname"><a href="class_painting_area.html#a6e9207612cef104d39013564696fe989">PaintingArea::addLayer</a></div><div class="ttdeci">int addLayer(int width, int height, int widthOffset=0, int heightOffset=0, IntelliImage::ImageType type=IntelliImage::ImageType::RASTERIMAGE)</div><div class="ttdoc">The addLayer adds a layer to the current project/ painting area.</div><div class="ttdef"><b>Definition:</b> <a href="_painting_area_8cpp_source.html#l00062">PaintingArea.cpp:62</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_image_html_a5274ce9fcdcb2659c148e7ff916b680e"><div class="ttname"><a href="class_intelli_image.html#a5274ce9fcdcb2659c148e7ff916b680e">IntelliImage::ImageType</a></div><div class="ttdeci">ImageType</div><div class="ttdoc">The Types, which an Image can be.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_image_8h_source.html#l00030">IntelliImage.h:30</a></div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_html_a3fbd2584566b3cefcf3c070ae0b69d8fa0af50777920c1401ab975cab64c4d491"><div class="ttname"><a href="class_intelli_tool.html#a3fbd2584566b3cefcf3c070ae0b69d8fa0af50777920c1401ab975cab64c4d491">IntelliTool::Tooltype::CIRCLE</a></div><div class="ttdeci">@ CIRCLE</div></div>
|
|
<div class="ttc" id="aclass_intelli_tool_line_html"><div class="ttname"><a href="class_intelli_tool_line.html">IntelliToolLine</a></div><div class="ttdoc">The IntelliToolFloodFill class represents a tool to draw a line.</div><div class="ttdef"><b>Definition:</b> <a href="_intelli_tool_line_8h_source.html#l00013">IntelliToolLine.h:13</a></div></div>
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_13830bfc3dd6736fe878600c9081919f.html">Layer</a></li><li class="navelem"><a class="el" href="_painting_area_8cpp.html">PaintingArea.cpp</a></li>
|
|
<li class="footer">Generated by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|