I have put everything I need as I want it to be, my bitmaps, backgrounds and everything, what I need is to draw text that will be vertically shown. Here is my code for now:
private void drawTables(Canvas canvas) {
for (Table table : mTablesList) {
float x = mWidht * table.getLeft() / 100;
float y = mHeight * table.getTop() / 100;
Rect rect = new Rect();
rect.set(Math.round(x), Math.round(y), mWidht * table.getRight() / 100, mHeight * table.getBottom() / 100);
if (table.isAvaliable()) {
Drawable myDrawable = getResources().getDrawable(R.drawable.slobodan);
Bitmap myBitmap = ((BitmapDrawable) myDrawable).getBitmap();
table.setRect(rect);
Bitmap nova = getResizedBitmap(myBitmap, 60, 60);
Rect source = new Rect(0, 0, nova.getWidth(), nova.getHeight());
table.setSlikaRezervacije(nova);
canvas.drawBitmap(nova, source, table.getRect(), null);
} else if (!table.isAvaliable()) {
Drawable myDrawable = getResources().getDrawable(R.drawable.rezervisan);
Bitmap myBitmap = ((BitmapDrawable) myDrawable).getBitmap();
table.setRect(rect);
Bitmap nova = getResizedBitmap(myBitmap, 60, 60);
Rect source = new Rect(0, 0, nova.getWidth(), nova.getHeight());
table.setSlikaRezervacije(nova);
canvas.drawBitmap(nova, source, table.getRect(), null);
}
}}
First, you need Paint
Then, rotate your canvas
Then, you draw your text
The text should be drawn vertically based on the angle you supplied.
Then if you want to restore the canvas after:
You should check out the information on Canvas. It is very thorough.