Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- canvas.drawText(i.ssid, si.xPos, si.yPos - netNameDiff / 2.0f, paintNet);
- int offWidth = 100;
- int offHeight = 30;
- Bitmap.Config offConfig = Bitmap.Config.ARGB_4444;
- Bitmap offBitmap = Bitmap.createBitmap(offWidth, offHeight, offConfig);
- Canvas offCanvas = new Canvas(offBitmap);
- offCanvas.drawText(i.ssid, 5, 25, paintNet);
- canvas.drawBitmap(offBitmap, si.xPos, si.yPos + 10, null);
- float meshX = si.xPos;
- float meshY = si.yPos + 40;
- // (4+1) * (1+1) * 2 = 20 elements
- float[] verts =
- {
- meshX - 10.0f, meshY - 5.0f, // first column is stretched
- meshX + 25.0f, meshY + 0.0f,
- meshX + 50.0f, meshY + 0.0f,
- meshX + 75.0f, meshY + 0.0f,
- meshX + 100.0f, meshY + 0.0f,
- meshX - 10.0f, meshY + 35.0f, // first column stretched
- meshX + 25.0f, meshY + 30.0f,
- meshX + 50.0f, meshY + 30.0f,
- meshX + 75.0f, meshY + 30.0f,
- meshX + 100.0f, meshY + 30.0f
- };
- canvas.drawBitmapMesh(offBitmap, 4, 1, verts, 0, null, 0, null);
Advertisement
Add Comment
Please, Sign In to add comment