congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NinePatch.set
Code IndexAdd Tabnine to your IDE (free)

How to use
set
method
in
com.badlogic.gdx.graphics.g2d.NinePatch

Best Java code snippets using com.badlogic.gdx.graphics.g2d.NinePatch.set (Showing top 3 results out of 315)

origin: libgdx/libgdx

private void prepareVertices (Batch batch, float x, float y, float width, float height) {
  final float centerColumnX = x + leftWidth;
  final float rightColumnX = x + width - rightWidth;
  final float middleRowY = y + bottomHeight;
  final float topRowY = y + height - topHeight;
  final float c = tmpDrawColor.set(color).mul(batch.getColor()).toFloatBits();
  if (bottomLeft != -1) set(bottomLeft, x, y, centerColumnX - x, middleRowY - y, c);
  if (bottomCenter != -1) set(bottomCenter, centerColumnX, y, rightColumnX - centerColumnX, middleRowY - y, c);
  if (bottomRight != -1) set(bottomRight, rightColumnX, y, x + width - rightColumnX, middleRowY - y, c);
  if (middleLeft != -1) set(middleLeft, x, middleRowY, centerColumnX - x, topRowY - middleRowY, c);
  if (middleCenter != -1) set(middleCenter, centerColumnX, middleRowY, rightColumnX - centerColumnX, topRowY - middleRowY, c);
  if (middleRight != -1) set(middleRight, rightColumnX, middleRowY, x + width - rightColumnX, topRowY - middleRowY, c);
  if (topLeft != -1) set(topLeft, x, topRowY, centerColumnX - x, y + height - topRowY, c);
  if (topCenter != -1) set(topCenter, centerColumnX, topRowY, rightColumnX - centerColumnX, y + height - topRowY, c);
  if (topRight != -1) set(topRight, rightColumnX, topRowY, x + width - rightColumnX, y + height - topRowY, c);
}
origin: libgdx/libgdx

private void prepareVertices (Batch batch, float x, float y, float width, float height) {
  final float centerColumnX = x + leftWidth;
  final float rightColumnX = x + width - rightWidth;
  final float middleRowY = y + bottomHeight;
  final float topRowY = y + height - topHeight;
  final float c = tmpDrawColor.set(color).mul(batch.getColor()).toFloatBits();
  if (bottomLeft != -1) set(bottomLeft, x, y, centerColumnX - x, middleRowY - y, c);
  if (bottomCenter != -1) set(bottomCenter, centerColumnX, y, rightColumnX - centerColumnX, middleRowY - y, c);
  if (bottomRight != -1) set(bottomRight, rightColumnX, y, x + width - rightColumnX, middleRowY - y, c);
  if (middleLeft != -1) set(middleLeft, x, middleRowY, centerColumnX - x, topRowY - middleRowY, c);
  if (middleCenter != -1) set(middleCenter, centerColumnX, middleRowY, rightColumnX - centerColumnX, topRowY - middleRowY, c);
  if (middleRight != -1) set(middleRight, rightColumnX, middleRowY, x + width - rightColumnX, topRowY - middleRowY, c);
  if (topLeft != -1) set(topLeft, x, topRowY, centerColumnX - x, y + height - topRowY, c);
  if (topCenter != -1) set(topCenter, centerColumnX, topRowY, rightColumnX - centerColumnX, y + height - topRowY, c);
  if (topRight != -1) set(topRight, rightColumnX, topRowY, x + width - rightColumnX, y + height - topRowY, c);
}
origin: com.badlogicgames.gdx/gdx

private void prepareVertices (Batch batch, float x, float y, float width, float height) {
  final float centerColumnX = x + leftWidth;
  final float rightColumnX = x + width - rightWidth;
  final float middleRowY = y + bottomHeight;
  final float topRowY = y + height - topHeight;
  final float c = tmpDrawColor.set(color).mul(batch.getColor()).toFloatBits();
  if (bottomLeft != -1) set(bottomLeft, x, y, centerColumnX - x, middleRowY - y, c);
  if (bottomCenter != -1) set(bottomCenter, centerColumnX, y, rightColumnX - centerColumnX, middleRowY - y, c);
  if (bottomRight != -1) set(bottomRight, rightColumnX, y, x + width - rightColumnX, middleRowY - y, c);
  if (middleLeft != -1) set(middleLeft, x, middleRowY, centerColumnX - x, topRowY - middleRowY, c);
  if (middleCenter != -1) set(middleCenter, centerColumnX, middleRowY, rightColumnX - centerColumnX, topRowY - middleRowY, c);
  if (middleRight != -1) set(middleRight, rightColumnX, middleRowY, x + width - rightColumnX, topRowY - middleRowY, c);
  if (topLeft != -1) set(topLeft, x, topRowY, centerColumnX - x, y + height - topRowY, c);
  if (topCenter != -1) set(topCenter, centerColumnX, topRowY, rightColumnX - centerColumnX, y + height - topRowY, c);
  if (topRight != -1) set(topRight, rightColumnX, topRowY, x + width - rightColumnX, y + height - topRowY, c);
}
com.badlogic.gdx.graphics.g2dNinePatchset

Javadoc

Set the coordinates and color of a ninth of the patch.

Popular methods of NinePatch

  • <init>
    Construct a nine patch from the given nine texture regions. The provided patches must be consistentl
  • draw
  • setColor
    Copy given color. The color will be blended with the batch color, then combined with the texture col
  • getBottomHeight
  • getRightWidth
  • getTotalHeight
  • getTotalWidth
  • add
  • getLeftWidth
  • getPadBottom
    Returns the bottom padding if set, else returns #getBottomHeight().
  • getPadLeft
    Returns the left padding if set, else returns #getLeftWidth().
  • getPadRight
    Returns the right padding if set, else returns #getRightWidth().
  • getPadLeft,
  • getPadRight,
  • getPadTop,
  • getTexture,
  • getTopHeight,
  • load,
  • prepareVertices,
  • setPadding,
  • getColor

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Notification (javax.management)
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now