mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +09:00
1079 lines
46 KiB
HTML
1079 lines
46 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:06 CEST 2017 -->
|
|
<title>Pixmap (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Pixmap (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Pixmap.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/PerspectiveCamera.html" title="class in com.badlogic.gdx.graphics"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/graphics/Pixmap.html" target="_top">Frames</a></li>
|
|
<li><a href="Pixmap.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.graphics</div>
|
|
<h2 title="Class Pixmap" class="title">Class Pixmap</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.graphics.Pixmap</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">Pixmap</span>
|
|
extends java.lang.Object
|
|
implements <a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</a></pre>
|
|
<div class="block"><p>
|
|
A Pixmap represents an image in memory. It has a width and height expressed in pixels as well as a <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Format</code></a> specifying
|
|
the number and order of color components per pixel. Coordinates of pixels are specified with respect to the top left corner of
|
|
the image, with the x-axis pointing to the right and the y-axis pointing downwards.
|
|
</p>
|
|
|
|
<p>
|
|
By default all methods use blending. You can disable blending with <a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setBlending-com.badlogic.gdx.graphics.Pixmap.Blending-"><code>setBlending(Blending)</code></a>. The
|
|
<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-"><code>drawPixmap(Pixmap, int, int, int, int, int, int, int, int)</code></a> method will scale and stretch the source image to a
|
|
target image. There either nearest neighbour or bilinear filtering can be used.
|
|
</p>
|
|
|
|
<p>
|
|
A Pixmap stores its data in native heap memory. It is mandatory to call <a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#dispose--"><code>dispose()</code></a> when the pixmap is no longer
|
|
needed, otherwise memory leaks will result
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>badlogicgames@gmail.com</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Class and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Blending</a></span></code>
|
|
<div class="block">Blending functions to be set with <a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setBlending-com.badlogic.gdx.graphics.Pixmap.Blending-"><code>setBlending(com.badlogic.gdx.graphics.Pixmap.Blending)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Filter.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Filter</a></span></code>
|
|
<div class="block">Filters to be used with <a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-"><code>drawPixmap(Pixmap, int, int, int, int, int, int, int, int)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</a></span></code>
|
|
<div class="block">Different pixel formats.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#Pixmap-byte:A-int-int-">Pixmap</a></span>(byte[] encodedData,
|
|
int offset,
|
|
int len)</code>
|
|
<div class="block">Creates a new Pixmap instance from the given encoded image data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#Pixmap-com.badlogic.gdx.files.FileHandle-">Pixmap</a></span>(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> file)</code>
|
|
<div class="block">Creates a new Pixmap instance from the given file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#Pixmap-com.badlogic.gdx.graphics.g2d.Gdx2DPixmap-">Pixmap</a></span>(<a href="../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d">Gdx2DPixmap</a> pixmap)</code>
|
|
<div class="block">Constructs a new Pixmap from a <a href="../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d"><code>Gdx2DPixmap</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#Pixmap-int-int-com.badlogic.gdx.graphics.Pixmap.Format-">Pixmap</a></span>(int width,
|
|
int height,
|
|
<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</a> format)</code>
|
|
<div class="block">Creates a new Pixmap instance with the given width, height and format.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#dispose--">dispose</a></span>()</code>
|
|
<div class="block">Releases all resources associated with this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawCircle-int-int-int-">drawCircle</a></span>(int x,
|
|
int y,
|
|
int radius)</code>
|
|
<div class="block">Draws a circle outline with the center at x,y and a radius using the current color and stroke width.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawLine-int-int-int-int-">drawLine</a></span>(int x,
|
|
int y,
|
|
int x2,
|
|
int y2)</code>
|
|
<div class="block">Draws a line between the given coordinates using the currently set color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixel-int-int-">drawPixel</a></span>(int x,
|
|
int y)</code>
|
|
<div class="block">Draws a pixel at the given location with the current color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixel-int-int-int-">drawPixel</a></span>(int x,
|
|
int y,
|
|
int color)</code>
|
|
<div class="block">Draws a pixel at the given location with the given color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-">drawPixmap</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int x,
|
|
int y)</code>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-">drawPixmap</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int x,
|
|
int y,
|
|
int srcx,
|
|
int srcy,
|
|
int srcWidth,
|
|
int srcHeight)</code>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-">drawPixmap</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int srcx,
|
|
int srcy,
|
|
int srcWidth,
|
|
int srcHeight,
|
|
int dstx,
|
|
int dsty,
|
|
int dstWidth,
|
|
int dstHeight)</code>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawRectangle-int-int-int-int-">drawRectangle</a></span>(int x,
|
|
int y,
|
|
int width,
|
|
int height)</code>
|
|
<div class="block">Draws a rectangle outline starting at x, y extending by width to the right and by height downwards (y-axis points downwards)
|
|
using the current color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#fill--">fill</a></span>()</code>
|
|
<div class="block">Fills the complete bitmap with the currently set color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#fillCircle-int-int-int-">fillCircle</a></span>(int x,
|
|
int y,
|
|
int radius)</code>
|
|
<div class="block">Fills a circle with the center at x,y and a radius using the current color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#fillRectangle-int-int-int-int-">fillRectangle</a></span>(int x,
|
|
int y,
|
|
int width,
|
|
int height)</code>
|
|
<div class="block">Fills a rectangle starting at x, y extending by width to the right and by height downwards (y-axis points downwards) using
|
|
the current color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#fillTriangle-int-int-int-int-int-int-">fillTriangle</a></span>(int x1,
|
|
int y1,
|
|
int x2,
|
|
int y2,
|
|
int x3,
|
|
int y3)</code>
|
|
<div class="block">Fills a triangle with vertices at x1,y1 and x2,y2 and x3,y3 using the current color.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Blending</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getBlending--">getBlending</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getFormat--">getFormat</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getGLFormat--">getGLFormat</a></span>()</code>
|
|
<div class="block">Returns the OpenGL ES format of this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getGLInternalFormat--">getGLInternalFormat</a></span>()</code>
|
|
<div class="block">Returns the OpenGL ES format of this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getGLType--">getGLType</a></span>()</code>
|
|
<div class="block">Returns the OpenGL ES type of this Pixmap.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getHeight--">getHeight</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getPixel-int-int-">getPixel</a></span>(int x,
|
|
int y)</code>
|
|
<div class="block">Returns the 32-bit RGBA8888 value of the pixel at x, y.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>java.nio.ByteBuffer</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getPixels--">getPixels</a></span>()</code>
|
|
<div class="block">Returns the direct ByteBuffer holding the pixel data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#getWidth--">getWidth</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setBlending-com.badlogic.gdx.graphics.Pixmap.Blending-">setBlending</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Blending</a> blending)</code>
|
|
<div class="block">Sets the type of <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Blending</code></a> to be used for all operations.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setColor-com.badlogic.gdx.graphics.Color-">setColor</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color</a> color)</code>
|
|
<div class="block">Sets the color for the following drawing operations.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setColor-float-float-float-float-">setColor</a></span>(float r,
|
|
float g,
|
|
float b,
|
|
float a)</code>
|
|
<div class="block">Sets the color for the following drawing operations.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setColor-int-">setColor</a></span>(int color)</code>
|
|
<div class="block">Sets the color for the following drawing operations</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setFilter-com.badlogic.gdx.graphics.Pixmap.Filter-">setFilter</a></span>(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Filter.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Filter</a> filter)</code>
|
|
<div class="block">Sets the type of interpolation <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Filter.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Filter</code></a> to be used in conjunction with
|
|
<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-"><code>drawPixmap(Pixmap, int, int, int, int, int, int, int, int)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Pixmap-int-int-com.badlogic.gdx.graphics.Pixmap.Format-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Pixmap</h4>
|
|
<pre>public Pixmap(int width,
|
|
int height,
|
|
<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</a> format)</pre>
|
|
<div class="block">Creates a new Pixmap instance with the given width, height and format.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>width</code> - the width in pixels</dd>
|
|
<dd><code>height</code> - the height in pixels</dd>
|
|
<dd><code>format</code> - the <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Format</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Pixmap-byte:A-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Pixmap</h4>
|
|
<pre>public Pixmap(byte[] encodedData,
|
|
int offset,
|
|
int len)</pre>
|
|
<div class="block">Creates a new Pixmap instance from the given encoded image data. The image can be encoded as JPEG, PNG or BMP.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>encodedData</code> - the encoded image data</dd>
|
|
<dd><code>offset</code> - the offset</dd>
|
|
<dd><code>len</code> - the length</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Pixmap-com.badlogic.gdx.files.FileHandle-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Pixmap</h4>
|
|
<pre>public Pixmap(<a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a> file)</pre>
|
|
<div class="block">Creates a new Pixmap instance from the given file. The file must be a Png, Jpeg or Bitmap. Paletted formats are not
|
|
supported.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>file</code> - the <a href="../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files"><code>FileHandle</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Pixmap-com.badlogic.gdx.graphics.g2d.Gdx2DPixmap-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Pixmap</h4>
|
|
<pre>public Pixmap(<a href="../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d">Gdx2DPixmap</a> pixmap)</pre>
|
|
<div class="block">Constructs a new Pixmap from a <a href="../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d"><code>Gdx2DPixmap</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixmap</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="setBlending-com.badlogic.gdx.graphics.Pixmap.Blending-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setBlending</h4>
|
|
<pre>public void setBlending(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Blending</a> blending)</pre>
|
|
<div class="block">Sets the type of <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Blending</code></a> to be used for all operations. Default is <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html#SourceOver"><code>Pixmap.Blending.SourceOver</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>blending</code> - the blending type</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setFilter-com.badlogic.gdx.graphics.Pixmap.Filter-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setFilter</h4>
|
|
<pre>public void setFilter(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.Filter.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Filter</a> filter)</pre>
|
|
<div class="block">Sets the type of interpolation <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Filter.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Filter</code></a> to be used in conjunction with
|
|
<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-"><code>drawPixmap(Pixmap, int, int, int, int, int, int, int, int)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>filter</code> - the filter.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setColor-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setColor</h4>
|
|
<pre>public void setColor(int color)</pre>
|
|
<div class="block">Sets the color for the following drawing operations</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>color</code> - the color, encoded as RGBA8888</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setColor-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setColor</h4>
|
|
<pre>public void setColor(float r,
|
|
float g,
|
|
float b,
|
|
float a)</pre>
|
|
<div class="block">Sets the color for the following drawing operations.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>r</code> - The red component.</dd>
|
|
<dd><code>g</code> - The green component.</dd>
|
|
<dd><code>b</code> - The blue component.</dd>
|
|
<dd><code>a</code> - The alpha component.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setColor-com.badlogic.gdx.graphics.Color-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setColor</h4>
|
|
<pre>public void setColor(<a href="../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color</a> color)</pre>
|
|
<div class="block">Sets the color for the following drawing operations.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>color</code> - The color.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fill--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fill</h4>
|
|
<pre>public void fill()</pre>
|
|
<div class="block">Fills the complete bitmap with the currently set color.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="drawLine-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawLine</h4>
|
|
<pre>public void drawLine(int x,
|
|
int y,
|
|
int x2,
|
|
int y2)</pre>
|
|
<div class="block">Draws a line between the given coordinates using the currently set color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-coodinate of the first point</dd>
|
|
<dd><code>y</code> - The y-coordinate of the first point</dd>
|
|
<dd><code>x2</code> - The x-coordinate of the first point</dd>
|
|
<dd><code>y2</code> - The y-coordinate of the first point</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawRectangle-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawRectangle</h4>
|
|
<pre>public void drawRectangle(int x,
|
|
int y,
|
|
int width,
|
|
int height)</pre>
|
|
<div class="block">Draws a rectangle outline starting at x, y extending by width to the right and by height downwards (y-axis points downwards)
|
|
using the current color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x coordinate</dd>
|
|
<dd><code>y</code> - The y coordinate</dd>
|
|
<dd><code>width</code> - The width in pixels</dd>
|
|
<dd><code>height</code> - The height in pixels</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawPixmap</h4>
|
|
<pre>public void drawPixmap(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int x,
|
|
int y)</pre>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixmap</code> - The other Pixmap</dd>
|
|
<dd><code>x</code> - The target x-coordinate (top left corner)</dd>
|
|
<dd><code>y</code> - The target y-coordinate (top left corner)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawPixmap</h4>
|
|
<pre>public void drawPixmap(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int x,
|
|
int y,
|
|
int srcx,
|
|
int srcy,
|
|
int srcWidth,
|
|
int srcHeight)</pre>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixmap</code> - The other Pixmap</dd>
|
|
<dd><code>x</code> - The target x-coordinate (top left corner)</dd>
|
|
<dd><code>y</code> - The target y-coordinate (top left corner)</dd>
|
|
<dd><code>srcx</code> - The source x-coordinate (top left corner)</dd>
|
|
<dd><code>srcy</code> - The source y-coordinate (top left corner);</dd>
|
|
<dd><code>srcWidth</code> - The width of the area from the other Pixmap in pixels</dd>
|
|
<dd><code>srcHeight</code> - The height of the area from the other Pixmap in pixels</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawPixmap-com.badlogic.gdx.graphics.Pixmap-int-int-int-int-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawPixmap</h4>
|
|
<pre>public void drawPixmap(<a href="../../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a> pixmap,
|
|
int srcx,
|
|
int srcy,
|
|
int srcWidth,
|
|
int srcHeight,
|
|
int dstx,
|
|
int dsty,
|
|
int dstWidth,
|
|
int dstHeight)</pre>
|
|
<div class="block">Draws an area from another Pixmap to this Pixmap. This will automatically scale and stretch the source image to the
|
|
specified target rectangle. Use <a href="../../../../com/badlogic/gdx/graphics/Pixmap.html#setFilter-com.badlogic.gdx.graphics.Pixmap.Filter-"><code>setFilter(Filter)</code></a> to specify the type of filtering to be used (nearest
|
|
neighbour or bilinear).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pixmap</code> - The other Pixmap</dd>
|
|
<dd><code>srcx</code> - The source x-coordinate (top left corner)</dd>
|
|
<dd><code>srcy</code> - The source y-coordinate (top left corner);</dd>
|
|
<dd><code>srcWidth</code> - The width of the area from the other Pixmap in pixels</dd>
|
|
<dd><code>srcHeight</code> - The height of the area from the other Pixmap in pixels</dd>
|
|
<dd><code>dstx</code> - The target x-coordinate (top left corner)</dd>
|
|
<dd><code>dsty</code> - The target y-coordinate (top left corner)</dd>
|
|
<dd><code>dstWidth</code> - The target width</dd>
|
|
<dd><code>dstHeight</code> - the target height</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fillRectangle-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fillRectangle</h4>
|
|
<pre>public void fillRectangle(int x,
|
|
int y,
|
|
int width,
|
|
int height)</pre>
|
|
<div class="block">Fills a rectangle starting at x, y extending by width to the right and by height downwards (y-axis points downwards) using
|
|
the current color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x coordinate</dd>
|
|
<dd><code>y</code> - The y coordinate</dd>
|
|
<dd><code>width</code> - The width in pixels</dd>
|
|
<dd><code>height</code> - The height in pixels</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawCircle-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawCircle</h4>
|
|
<pre>public void drawCircle(int x,
|
|
int y,
|
|
int radius)</pre>
|
|
<div class="block">Draws a circle outline with the center at x,y and a radius using the current color and stroke width.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-coordinate of the center</dd>
|
|
<dd><code>y</code> - The y-coordinate of the center</dd>
|
|
<dd><code>radius</code> - The radius in pixels</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fillCircle-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fillCircle</h4>
|
|
<pre>public void fillCircle(int x,
|
|
int y,
|
|
int radius)</pre>
|
|
<div class="block">Fills a circle with the center at x,y and a radius using the current color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-coordinate of the center</dd>
|
|
<dd><code>y</code> - The y-coordinate of the center</dd>
|
|
<dd><code>radius</code> - The radius in pixels</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="fillTriangle-int-int-int-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fillTriangle</h4>
|
|
<pre>public void fillTriangle(int x1,
|
|
int y1,
|
|
int x2,
|
|
int y2,
|
|
int x3,
|
|
int y3)</pre>
|
|
<div class="block">Fills a triangle with vertices at x1,y1 and x2,y2 and x3,y3 using the current color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x1</code> - The x-coordinate of vertex 1</dd>
|
|
<dd><code>y1</code> - The y-coordinate of vertex 1</dd>
|
|
<dd><code>x2</code> - The x-coordinate of vertex 2</dd>
|
|
<dd><code>y2</code> - The y-coordinate of vertex 2</dd>
|
|
<dd><code>x3</code> - The x-coordinate of vertex 3</dd>
|
|
<dd><code>y3</code> - The y-coordinate of vertex 3</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPixel-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPixel</h4>
|
|
<pre>public int getPixel(int x,
|
|
int y)</pre>
|
|
<div class="block">Returns the 32-bit RGBA8888 value of the pixel at x, y. For Alpha formats the RGB components will be one.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The x-coordinate</dd>
|
|
<dd><code>y</code> - The y-coordinate</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The pixel color in RGBA8888 format.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getWidth--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getWidth</h4>
|
|
<pre>public int getWidth()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The width of the Pixmap in pixels.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getHeight--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getHeight</h4>
|
|
<pre>public int getHeight()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The height of the Pixmap in pixels.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="dispose--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>dispose</h4>
|
|
<pre>public void dispose()</pre>
|
|
<div class="block">Releases all resources associated with this Pixmap.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/badlogic/gdx/utils/Disposable.html#dispose--">dispose</a></code> in interface <code><a href="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawPixel-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawPixel</h4>
|
|
<pre>public void drawPixel(int x,
|
|
int y)</pre>
|
|
<div class="block">Draws a pixel at the given location with the current color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x-coordinate</dd>
|
|
<dd><code>y</code> - the y-coordinate</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="drawPixel-int-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>drawPixel</h4>
|
|
<pre>public void drawPixel(int x,
|
|
int y,
|
|
int color)</pre>
|
|
<div class="block">Draws a pixel at the given location with the given color.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x-coordinate</dd>
|
|
<dd><code>y</code> - the y-coordinate</dd>
|
|
<dd><code>color</code> - the color in RGBA8888 format.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGLFormat--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGLFormat</h4>
|
|
<pre>public int getGLFormat()</pre>
|
|
<div class="block">Returns the OpenGL ES format of this Pixmap. Used as the seventh parameter to
|
|
<a href="../../../../com/badlogic/gdx/graphics/GL20.html#glTexImage2D-int-int-int-int-int-int-int-int-java.nio.Buffer-"><code>GL20.glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGLInternalFormat--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGLInternalFormat</h4>
|
|
<pre>public int getGLInternalFormat()</pre>
|
|
<div class="block">Returns the OpenGL ES format of this Pixmap. Used as the third parameter to
|
|
<a href="../../../../com/badlogic/gdx/graphics/GL20.html#glTexImage2D-int-int-int-int-int-int-int-int-java.nio.Buffer-"><code>GL20.glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGLType--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGLType</h4>
|
|
<pre>public int getGLType()</pre>
|
|
<div class="block">Returns the OpenGL ES type of this Pixmap. Used as the eighth parameter to
|
|
<a href="../../../../com/badlogic/gdx/graphics/GL20.html#glTexImage2D-int-int-int-int-int-int-int-int-java.nio.Buffer-"><code>GL20.glTexImage2D(int, int, int, int, int, int, int, int, java.nio.Buffer)</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPixels--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPixels</h4>
|
|
<pre>public java.nio.ByteBuffer getPixels()</pre>
|
|
<div class="block">Returns the direct ByteBuffer holding the pixel data. For the format Alpha each value is encoded as a byte. For the format
|
|
LuminanceAlpha the luminance is the first byte and the alpha is the second byte of the pixel. For the formats RGB888 and
|
|
RGBA8888 the color components are stored in a single byte each in the order red, green, blue (alpha). For the formats RGB565
|
|
and RGBA4444 the pixel colors are stored in shorts in machine dependent order.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the direct <code>ByteBuffer</code> holding the pixel data.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getFormat--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getFormat</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Format</a> getFormat()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Format.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Format</code></a> of this Pixmap.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBlending--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getBlending</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics">Pixmap.Blending</a> getBlending()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the currently set <a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics"><code>Pixmap.Blending</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Pixmap.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/PerspectiveCamera.html" title="class in com.badlogic.gdx.graphics"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/Pixmap.Blending.html" title="enum in com.badlogic.gdx.graphics"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/graphics/Pixmap.html" target="_top">Frames</a></li>
|
|
<li><a href="Pixmap.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|