Guest User

Untitled

a guest
Dec 25th, 2010
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1.             canvas.drawText(i.ssid, si.xPos, si.yPos - netNameDiff / 2.0f, paintNet);
  2.  
  3.             int offWidth = 100;
  4.             int offHeight = 30;
  5.             Bitmap.Config offConfig = Bitmap.Config.ARGB_4444;
  6.             Bitmap offBitmap = Bitmap.createBitmap(offWidth, offHeight, offConfig);
  7.             Canvas offCanvas = new Canvas(offBitmap);
  8.  
  9.             offCanvas.drawText(i.ssid, 5, 25, paintNet);
  10.  
  11.             canvas.drawBitmap(offBitmap, si.xPos, si.yPos + 10, null);
  12.  
  13.             float meshX = si.xPos;
  14.             float meshY = si.yPos + 40;
  15.  
  16.             // (4+1) * (1+1) * 2 = 20 elements
  17.             float[] verts =
  18.                 {
  19.                     meshX - 10.0f,  meshY - 5.0f,       // first column is stretched
  20.                     meshX + 25.0f,  meshY + 0.0f,
  21.                     meshX + 50.0f, meshY + 0.0f,
  22.                     meshX + 75.0f, meshY + 0.0f,
  23.                     meshX + 100.0f, meshY + 0.0f,
  24.  
  25.                     meshX - 10.0f,  meshY + 35.0f,      // first column stretched
  26.                     meshX + 25.0f,  meshY + 30.0f,
  27.                     meshX + 50.0f, meshY + 30.0f,
  28.                     meshX + 75.0f, meshY + 30.0f,
  29.                     meshX + 100.0f, meshY + 30.0f
  30.                 };
  31.             canvas.drawBitmapMesh(offBitmap, 4, 1, verts, 0, null, 0, null);
Advertisement
Add Comment
Please, Sign In to add comment