mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00

In this update, we have chosen not to include CAPIs. This decision was made due to the mixture of C++ and C languages in a single documentation category, which resulted in a messy presentation. Also, In this update, we have removed 'doxygen-awesome-css' and introduced our own designated styles located in the 'style' folder. After generating the Doxyfiles, we can overwrite the styles with these new ones.
688 lines
51 KiB
HTML
688 lines
51 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.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>ThorVG: Picture</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="projectlogo"><img alt="Logo" src="small_logo.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">ThorVG
|
|
 <span id="projectnumber">v0.11</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<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','.html');
|
|
/* @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('classtvg_1_1Picture.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="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="classtvg_1_1Picture-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Picture<span class="mlabels"><span class="mlabel">final</span></span><div class="ingroups"><a class="el" href="group__ThorVG.html">ThorVG</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A class representing an image read in one of the supported formats: raw, svg, png, jpg, lottie(json) and etc. Besides the methods inherited from the <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a>, it provides methods to load & draw images on the canvas.
|
|
<a href="classtvg_1_1Picture.html#details">More...</a></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for Picture:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classtvg_1_1Picture__inherit__graph.png" border="0" usemap="#aPicture_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="aPicture_inherit__map" id="aPicture_inherit__map">
|
|
<area shape="rect" title="A class representing an image read in one of the supported formats: raw, svg, png,..." alt="" coords="5,80,72,107"/>
|
|
<area shape="rect" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements." alt="" coords="11,5,66,32"/>
|
|
</map>
|
|
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:aaf06be7d0b572c5ce35315cbddd7d318"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#aaf06be7d0b572c5ce35315cbddd7d318">load</a> (const std::string &path) noexcept</td></tr>
|
|
<tr class="memdesc:aaf06be7d0b572c5ce35315cbddd7d318"><td class="mdescLeft"> </td><td class="mdescRight">Loads a picture data directly from a file. <a href="classtvg_1_1Picture.html#aaf06be7d0b572c5ce35315cbddd7d318">More...</a><br /></td></tr>
|
|
<tr class="separator:aaf06be7d0b572c5ce35315cbddd7d318"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3e487c0b236a6eea853c5ccb7665cdce"><td class="memItemLeft" align="right" valign="top">TVG_DEPRECATED <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a3e487c0b236a6eea853c5ccb7665cdce">load</a> (const char *data, uint32_t <a class="el" href="classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40">size</a>, bool copy=false) noexcept</td></tr>
|
|
<tr class="memdesc:a3e487c0b236a6eea853c5ccb7665cdce"><td class="mdescLeft"> </td><td class="mdescRight">Loads a picture data from a memory block of a given size. <a href="classtvg_1_1Picture.html#a3e487c0b236a6eea853c5ccb7665cdce">More...</a><br /></td></tr>
|
|
<tr class="separator:a3e487c0b236a6eea853c5ccb7665cdce"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a95979a7c4ce51445c7ef9d6461c34767"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a95979a7c4ce51445c7ef9d6461c34767">load</a> (const char *data, uint32_t <a class="el" href="classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40">size</a>, const std::string &mimeType, bool copy=false) noexcept</td></tr>
|
|
<tr class="memdesc:a95979a7c4ce51445c7ef9d6461c34767"><td class="mdescLeft"> </td><td class="mdescRight">Loads a picture data from a memory block of a given size. <a href="classtvg_1_1Picture.html#a95979a7c4ce51445c7ef9d6461c34767">More...</a><br /></td></tr>
|
|
<tr class="separator:a95979a7c4ce51445c7ef9d6461c34767"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a065e47b46c791ee4d93ed3252d581a40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40">size</a> (float w, float h) noexcept</td></tr>
|
|
<tr class="memdesc:a065e47b46c791ee4d93ed3252d581a40"><td class="mdescLeft"> </td><td class="mdescRight">Resizes the picture content to the given width and height. <a href="classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40">More...</a><br /></td></tr>
|
|
<tr class="separator:a065e47b46c791ee4d93ed3252d581a40"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af80639ef3460a5cf06278fdc03c13aad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#af80639ef3460a5cf06278fdc03c13aad">size</a> (float *w, float *h) const noexcept</td></tr>
|
|
<tr class="memdesc:af80639ef3460a5cf06278fdc03c13aad"><td class="mdescLeft"> </td><td class="mdescRight">Gets the size of the image. <a href="classtvg_1_1Picture.html#af80639ef3460a5cf06278fdc03c13aad">More...</a><br /></td></tr>
|
|
<tr class="separator:af80639ef3460a5cf06278fdc03c13aad"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1fdf75092cebaa7cde48d6a7d4946368"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a1fdf75092cebaa7cde48d6a7d4946368">load</a> (uint32_t *data, uint32_t w, uint32_t h, bool copy) noexcept</td></tr>
|
|
<tr class="memdesc:a1fdf75092cebaa7cde48d6a7d4946368"><td class="mdescLeft"> </td><td class="mdescRight">Loads a raw data from a memory block with a given size. <a href="classtvg_1_1Picture.html#a1fdf75092cebaa7cde48d6a7d4946368">More...</a><br /></td></tr>
|
|
<tr class="separator:a1fdf75092cebaa7cde48d6a7d4946368"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a761d19e78330e8ce73add01cbf1cd2e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a761d19e78330e8ce73add01cbf1cd2e9">mesh</a> (const <a class="el" href="structtvg_1_1Polygon.html">Polygon</a> *triangles, uint32_t triangleCnt) noexcept</td></tr>
|
|
<tr class="memdesc:a761d19e78330e8ce73add01cbf1cd2e9"><td class="mdescLeft"> </td><td class="mdescRight">Sets or removes the triangle mesh to deform the image. <a href="classtvg_1_1Picture.html#a761d19e78330e8ce73add01cbf1cd2e9">More...</a><br /></td></tr>
|
|
<tr class="separator:a761d19e78330e8ce73add01cbf1cd2e9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae4d1479dbae28f521da8e90f91a97caa"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#ae4d1479dbae28f521da8e90f91a97caa">mesh</a> (const <a class="el" href="structtvg_1_1Polygon.html">Polygon</a> **triangles) const noexcept</td></tr>
|
|
<tr class="memdesc:ae4d1479dbae28f521da8e90f91a97caa"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of triangles in the mesh, and optionally get a pointer to the array of triangles in the mesh. <a href="classtvg_1_1Picture.html#ae4d1479dbae28f521da8e90f91a97caa">More...</a><br /></td></tr>
|
|
<tr class="separator:ae4d1479dbae28f521da8e90f91a97caa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pub_methods_classtvg_1_1Paint"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtvg_1_1Paint')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classtvg_1_1Paint.html">Paint</a></td></tr>
|
|
<tr class="memitem:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a7841fa0c14643e09735d48042ead68f3">rotate</a> (float degree) noexcept</td></tr>
|
|
<tr class="memdesc:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the angle by which the object is rotated. <a href="classtvg_1_1Paint.html#a7841fa0c14643e09735d48042ead68f3">More...</a><br /></td></tr>
|
|
<tr class="separator:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a5c057876185525c5723215f95a3984f2">scale</a> (float factor) noexcept</td></tr>
|
|
<tr class="memdesc:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the scale value of the object. <a href="classtvg_1_1Paint.html#a5c057876185525c5723215f95a3984f2">More...</a><br /></td></tr>
|
|
<tr class="separator:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e">translate</a> (float x, float y) noexcept</td></tr>
|
|
<tr class="memdesc:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the values by which the object is moved in a two-dimensional space. <a href="classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e">More...</a><br /></td></tr>
|
|
<tr class="separator:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#ac9f6ba428afe884bcc2861de0a2a96f4">transform</a> (const <a class="el" href="structtvg_1_1Matrix.html">Matrix</a> &m) noexcept</td></tr>
|
|
<tr class="memdesc:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the matrix of the affine transformation for the object. <a href="classtvg_1_1Paint.html#ac9f6ba428afe884bcc2861de0a2a96f4">More...</a><br /></td></tr>
|
|
<tr class="separator:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad1e49b6eb81e87bd860f19e1b92c574b inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structtvg_1_1Matrix.html">Matrix</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#ad1e49b6eb81e87bd860f19e1b92c574b">transform</a> () noexcept</td></tr>
|
|
<tr class="memdesc:ad1e49b6eb81e87bd860f19e1b92c574b inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the matrix of the affine transformation of the object. <a href="classtvg_1_1Paint.html#ad1e49b6eb81e87bd860f19e1b92c574b">More...</a><br /></td></tr>
|
|
<tr class="separator:ad1e49b6eb81e87bd860f19e1b92c574b inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a2f25b71fed3ae390eb8051c7ea65aebf">opacity</a> (uint8_t o) noexcept</td></tr>
|
|
<tr class="memdesc:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the opacity of the object. <a href="classtvg_1_1Paint.html#a2f25b71fed3ae390eb8051c7ea65aebf">More...</a><br /></td></tr>
|
|
<tr class="separator:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2e2d077b820d1cfd6502a86e0221638b inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a2e2d077b820d1cfd6502a86e0221638b">composite</a> (std::unique_ptr< <a class="el" href="classtvg_1_1Paint.html">Paint</a> > target, <a class="el" href="group__ThorVG.html#gaabdf94ada64e69d06deabc5aa6576f87">CompositeMethod</a> method) noexcept</td></tr>
|
|
<tr class="memdesc:a2e2d077b820d1cfd6502a86e0221638b inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the composition target object and the composition method. <a href="classtvg_1_1Paint.html#a2e2d077b820d1cfd6502a86e0221638b">More...</a><br /></td></tr>
|
|
<tr class="separator:a2e2d077b820d1cfd6502a86e0221638b inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7e1214a5dc2f3c19ddeedc5371c4e488 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a7e1214a5dc2f3c19ddeedc5371c4e488">blend</a> (<a class="el" href="group__ThorVG.html#ga4dd2f3776540c10b565e0446aa8e9e02">BlendMethod</a> method) const noexcept</td></tr>
|
|
<tr class="memdesc:a7e1214a5dc2f3c19ddeedc5371c4e488 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Sets the blending method for the paint object. <a href="classtvg_1_1Paint.html#a7e1214a5dc2f3c19ddeedc5371c4e488">More...</a><br /></td></tr>
|
|
<tr class="separator:a7e1214a5dc2f3c19ddeedc5371c4e488 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aed5a6ad8edd827a378111b590ed7755d inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top">TVG_DEPRECATED <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#aed5a6ad8edd827a378111b590ed7755d">bounds</a> (float *x, float *y, float *w, float *h) const noexcept</td></tr>
|
|
<tr class="memdesc:aed5a6ad8edd827a378111b590ed7755d inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the bounding box of the paint object before any transformation. <a href="classtvg_1_1Paint.html#aed5a6ad8edd827a378111b590ed7755d">More...</a><br /></td></tr>
|
|
<tr class="separator:aed5a6ad8edd827a378111b590ed7755d inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1b51b7344eac48d285c073bc488197d3 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a1b51b7344eac48d285c073bc488197d3">bounds</a> (float *x, float *y, float *w, float *h, bool transformed) const noexcept</td></tr>
|
|
<tr class="memdesc:a1b51b7344eac48d285c073bc488197d3 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the axis-aligned bounding box of the paint object. <a href="classtvg_1_1Paint.html#a1b51b7344eac48d285c073bc488197d3">More...</a><br /></td></tr>
|
|
<tr class="separator:a1b51b7344eac48d285c073bc488197d3 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtvg_1_1Paint.html">Paint</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a71afac69fe1e7c352460be5878812635">duplicate</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Duplicates the object. <a href="classtvg_1_1Paint.html#a71afac69fe1e7c352460be5878812635">More...</a><br /></td></tr>
|
|
<tr class="separator:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a2ee7517b8bfad47e0f999ba3450e0e3e">opacity</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the opacity value of the object. <a href="classtvg_1_1Paint.html#a2ee7517b8bfad47e0f999ba3450e0e3e">More...</a><br /></td></tr>
|
|
<tr class="separator:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aefe4ade5b1b6bc13d518bd5f968af3ee inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#gaabdf94ada64e69d06deabc5aa6576f87">CompositeMethod</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#aefe4ade5b1b6bc13d518bd5f968af3ee">composite</a> (const <a class="el" href="classtvg_1_1Paint.html">Paint</a> **target) const noexcept</td></tr>
|
|
<tr class="memdesc:aefe4ade5b1b6bc13d518bd5f968af3ee inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the composition target object and the composition method. <a href="classtvg_1_1Paint.html#aefe4ade5b1b6bc13d518bd5f968af3ee">More...</a><br /></td></tr>
|
|
<tr class="separator:aefe4ade5b1b6bc13d518bd5f968af3ee inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4bd3efb580822b2db64034e3f3cd18ad inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga4dd2f3776540c10b565e0446aa8e9e02">BlendMethod</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a4bd3efb580822b2db64034e3f3cd18ad">blend</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a4bd3efb580822b2db64034e3f3cd18ad inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Gets the blending method of the object. <a href="classtvg_1_1Paint.html#a4bd3efb580822b2db64034e3f3cd18ad">More...</a><br /></td></tr>
|
|
<tr class="separator:a4bd3efb580822b2db64034e3f3cd18ad inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a37466e9eff2de62ff15c9df3d72b656d inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a37466e9eff2de62ff15c9df3d72b656d">identifier</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a37466e9eff2de62ff15c9df3d72b656d inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft"> </td><td class="mdescRight">Return the unique id value of the paint instance. <a href="classtvg_1_1Paint.html#a37466e9eff2de62ff15c9df3d72b656d">More...</a><br /></td></tr>
|
|
<tr class="separator:a37466e9eff2de62ff15c9df3d72b656d inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a68af11946af3c1c63a4e915cd0207811"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr< <a class="el" href="classtvg_1_1Picture.html">Picture</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a68af11946af3c1c63a4e915cd0207811">gen</a> () noexcept</td></tr>
|
|
<tr class="memdesc:a68af11946af3c1c63a4e915cd0207811"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> object. <a href="classtvg_1_1Picture.html#a68af11946af3c1c63a4e915cd0207811">More...</a><br /></td></tr>
|
|
<tr class="separator:a68af11946af3c1c63a4e915cd0207811"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a13df43a335dadaea01769a726dc9ddfd"><td class="memItemLeft" align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Picture.html#a13df43a335dadaea01769a726dc9ddfd">identifier</a> () noexcept</td></tr>
|
|
<tr class="memdesc:a13df43a335dadaea01769a726dc9ddfd"><td class="mdescLeft"> </td><td class="mdescRight">Return the unique id value of this class. <a href="classtvg_1_1Picture.html#a13df43a335dadaea01769a726dc9ddfd">More...</a><br /></td></tr>
|
|
<tr class="separator:a13df43a335dadaea01769a726dc9ddfd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A class representing an image read in one of the supported formats: raw, svg, png, jpg, lottie(json) and etc. Besides the methods inherited from the <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a>, it provides methods to load & draw images on the canvas. </p>
|
|
<dl class="section note"><dt>Note</dt><dd>Supported formats are depended on the available TVG loaders. </dd>
|
|
<dd>
|
|
See <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> class if the picture data is animatable. </dd></dl>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a68af11946af3c1c63a4e915cd0207811"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a68af11946af3c1c63a4e915cd0207811">◆ </a></span>gen()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static std::unique_ptr<<a class="el" href="classtvg_1_1Picture.html">Picture</a>> gen </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Creates a new <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> object. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> object. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a13df43a335dadaea01769a726dc9ddfd"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a13df43a335dadaea01769a726dc9ddfd">◆ </a></span>identifier()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static uint32_t identifier </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return the unique id value of this class. </p>
|
|
<p>This method can be referred for identifying the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> class type.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The type id of the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> class. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3e487c0b236a6eea853c5ccb7665cdce"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3e487c0b236a6eea853c5ccb7665cdce">◆ </a></span>load() <span class="overload">[1/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">TVG_DEPRECATED <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> load </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>copy</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Loads a picture data from a memory block of a given size. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>A pointer to a memory location where the content of the picture file is stored. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size in bytes of the memory occupied by the <code>data</code>. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">copy</td><td>Decides whether the data should be copied into the engine local buffer.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae73a2e92f1c87086c838b442552a4775" title="The value returned in the event of a problem with the arguments given to the API - e....">Result::InvalidArguments</a></td><td>In case no data are provided or the <code>size</code> is zero or less. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>When trying to load a file with an unknown extension. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>If an error occurs at a later stage.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>: you have responsibility to release the <code>data</code> memory if the <code>copy</code> is true </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>Result <a class="el" href="classtvg_1_1Picture.html#aaf06be7d0b572c5ce35315cbddd7d318" title="Loads a picture data directly from a file.">load</a>(const char* data, uint32_t <a class="el" href="classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40" title="Resizes the picture content to the given width and height.">size</a>, const std::string& mimeType, bool copy = false) noexcept </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a95979a7c4ce51445c7ef9d6461c34767"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a95979a7c4ce51445c7ef9d6461c34767">◆ </a></span>load() <span class="overload">[2/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> load </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"><em>mimeType</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>copy</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Loads a picture data from a memory block of a given size. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>A pointer to a memory location where the content of the picture file is stored. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size in bytes of the memory occupied by the <code>data</code>. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">mimeType</td><td>Mimetype or extension of data such as "jpg", "jpeg", "lottie", "svg", "svg+xml", "png", etc. In case an empty string or an unknown type is provided, the loaders will be tried one by one. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">copy</td><td>If <code>true</code> the data are copied into the engine local buffer, otherwise they are not.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae73a2e92f1c87086c838b442552a4775" title="The value returned in the event of a problem with the arguments given to the API - e....">Result::InvalidArguments</a></td><td>In case no data are provided or the <code>size</code> is zero or less. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>When trying to load a file with an unknown extension. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>If an error occurs at a later stage.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>: It's the user responsibility to release the <code>data</code> memory if the <code>copy</code> is <code>true</code>.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>If you are unsure about the MIME type, you can provide an empty value like <code>""</code>, and thorvg will attempt to figure it out. </dd></dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.5 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aaf06be7d0b572c5ce35315cbddd7d318"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aaf06be7d0b572c5ce35315cbddd7d318">◆ </a></span>load() <span class="overload">[3/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> load </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"><em>path</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Loads a picture data directly from a file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>A path to the picture file.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae73a2e92f1c87086c838b442552a4775" title="The value returned in the event of a problem with the arguments given to the API - e....">Result::InvalidArguments</a></td><td>In case the <code>path</code> is invalid. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>When trying to load a file with an unknown extension. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>If an error occurs at a later stage.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The Load behavior can be asynchronous if the assigned thread number is greater than zero. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Initializer.html#aecd30dc028635b645b0dac5b6facea73" title="Initializes TVG engines.">Initializer::init()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1fdf75092cebaa7cde48d6a7d4946368"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1fdf75092cebaa7cde48d6a7d4946368">◆ </a></span>load() <span class="overload">[4/4]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> load </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>w</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>h</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>copy</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Loads a raw data from a memory block with a given size. </p>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed, <a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066abc2b4181e818f2e9b52b2bc54dd55907" title="The value returned in case of unsuccessful memory allocation.">Result::FailedAllocation</a></td><td>An internal error possibly with memory allocation.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section since"><dt>Since</dt><dd>0.9 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae4d1479dbae28f521da8e90f91a97caa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae4d1479dbae28f521da8e90f91a97caa">◆ </a></span>mesh() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint32_t mesh </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="structtvg_1_1Polygon.html">Polygon</a> ** </td>
|
|
<td class="paramname"><em>triangles</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return the number of triangles in the mesh, and optionally get a pointer to the array of triangles in the mesh. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">triangles</td><td>Optional. A pointer to the array of Polygons used by this mesh.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>uint32_t The number of polygons in the array.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>Modifying the triangles returned by this method will modify them directly within the mesh. </dd></dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>Please do not use it, this API is not official one. It could be modified in the next version.</dd></dl>
|
|
<p>@BETA_API </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a761d19e78330e8ce73add01cbf1cd2e9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a761d19e78330e8ce73add01cbf1cd2e9">◆ </a></span>mesh() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> mesh </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="structtvg_1_1Polygon.html">Polygon</a> * </td>
|
|
<td class="paramname"><em>triangles</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>triangleCnt</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets or removes the triangle mesh to deform the image. </p>
|
|
<p>If a mesh is provided, the transform property of the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> will apply to the triangle mesh, and the image data will be used as the texture.</p>
|
|
<p>If <code>triangles</code> is <code>nullptr</code>, or <code>triangleCnt</code> is 0, the mesh will be removed.</p>
|
|
<p>Only raster image types are supported at this time (png, jpg). Vector types like svg and tvg do not support. mesh deformation. However, if required you should be able to render a vector image to a raster image and then apply a mesh.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">triangles</td><td>An array of Polygons(triangles) that make up the mesh, or null to remove the mesh. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">triangleCnt</td><td>The number of Polygons(triangles) provided, or 0 to remove the mesh.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a88183b946cc5f0e8c96b2e66e1c74a7e" title="The value returned in all other cases.">Result::Unknown</a></td><td>If fails</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The Polygons are copied internally, so modifying them after calling Mesh::mesh has no affect. </dd></dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>Please do not use it, this API is not official one. It could be modified in the next version.</dd></dl>
|
|
<p>@BETA_API </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af80639ef3460a5cf06278fdc03c13aad"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af80639ef3460a5cf06278fdc03c13aad">◆ </a></span>size() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> size </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float * </td>
|
|
<td class="paramname"><em>w</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float * </td>
|
|
<td class="paramname"><em>h</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Gets the size of the image. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">w</td><td>The width of the image in pixels. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">h</td><td>The height of the image in pixels.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a> when succeed. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a065e47b46c791ee4d93ed3252d581a40"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a065e47b46c791ee4d93ed3252d581a40">◆ </a></span>size() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> size </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>w</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>h</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Resizes the picture content to the given width and height. </p>
|
|
<p>The picture content is resized while keeping the default size aspect ratio. The scaling factor is established for each of dimensions and the smaller value is applied to both of them.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">w</td><td>A new width of the image in pixels. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">h</td><td>A new height of the image in pixels.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a> when succeed, <a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><b>tvg</b></li><li class="navelem"><a class="el" href="classtvg_1_1Picture.html">Picture</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|