0
votes
5answers
49 views

android application crashes when rotating the screen

My app crashec when rotating the device. I know it crashes because whenI rotate the screen it tries to create new View to draw and display but how can it create the view and display it properly on the ...
0
votes
1answer
23 views

Retrieve new width and height of BufferedImage bounds after a AffineTransform.rotate()

I'm working on a type of image editor which includes snapping to other elements as a feature. The snapping works by using the image width and height. However, after an AffineTransform.rotate() the ...
0
votes
0answers
34 views

Java Rotate ImageIcon About Center by Given Angle

This seems like an easy task, but I've literally searched for hours and haven't found anything so far. I have an ImageIcon which I would like to rotate by a certain angle. What would be the simplest ...
13
votes
7answers
352 views

Check integer is bit rotation of another integer

Given two integers a and b, how can we check that b is a rotated version of a? For example if I have a = 0x01020304 (in binary 0000 0001 0000 0010 0000 0011 0000 0100), then the following b values ...
1
vote
1answer
61 views

Rotating a 2-dimensional array n degrees in java

I'm making a 2d physics engine, when ever a object(like a chair) is spawned, it creates a 2d boolean array twice the size of the original image(to allow for rotation) and creates a shape the same as ...
3
votes
1answer
74 views

Position a image inside a rotating image

I have two images, one for a zombie and one for a blade that the zombie will have a 10 % chance to spawn with. I want to position the blade so that it will overlap the zombies right hand. I would be ...
2
votes
1answer
39 views

Polygon shape shrinks when it rotates

I am struggeling with the rotation of 6 points. These points rotate around a center point in the middle. But what happens is that the shapes area shrinks, and gets smaller and smaller. The Drawing of ...
0
votes
0answers
27 views

Included layout children changing when rotated

I've recently started porting my app over to Android from iOS and I am having a bit of a struggle. What I am trying to do is display some data in a bunch of key-value type pair things. I'm using ...
0
votes
1answer
31 views

Need help getting image to rotate to face the mouse in a top-down shooter (Java)

I am having trouble with the movement of the player in my game. The game is a top-down shooter in which the location of the player is controlled with W, A, S, and D. I want to control the direction ...
0
votes
0answers
31 views

Place a rectangle inside a specific location of another rotating rectangle

I have two rectangles, one of them will always rotate around another rectangle and the second one I want to be stuck in a specific location of the first rectangle. I know how to do it so that the ...
3
votes
2answers
58 views

Get the corners of a rotating rectangle

I have a rectangle that rotates around it's middle and I have another rectangle that I want to connect to the upper right corner of the rotating rectangle. The problem is that I have no idea how to ...
0
votes
1answer
49 views

How do I make a rectangle rotate to face cursor?

I'm hope to make a very basic game for my end of year project (going though computer science in high school) but cant find any answers as to how to make the rectangle I am drawing to face the cursor. ...
0
votes
2answers
53 views

why dynamically created elements will be cleaned in java(android)?

I am developing an aplication by java for android.in my app i create some TableRows dynamically by code.when i rotate or go to another activity and return,my created elements will be cleaned.why? I ...
0
votes
2answers
70 views

Rotating a point around a center point

I am aware that there are a few questions about points and rotation out here, and I feel like Im almost there. I youst need a little push. I Have a shape with 6 points like this one. I want to ...
2
votes
1answer
40 views

Matching of images according to two points

I have pattern image with set of points and second tested image also with set of points. I know the coordinates x,y of points. The points have their names (numbers), I know the numbers of all points ...

1 2 3 4 5 17
15 30 50 per page