Questions tagged [rectangles]

A rectangle is a geometric shape: any quadrilateral with four right angles

1373 questions
0
votes
0 answers

I am having problems setting graphics2D

I am making a simple game where there are two rectangles drawn on the screen and with user input from the keyboard arrow keys one of the rectangles (the player) will move. I have made a Main class and a Play class which consists of all my game code,…
Rahul Khosla
  • 349
  • 9
  • 21
0
votes
1 answer

Redrawing rectangle on a Panel

In my code I am drawing a rectangle as a "frame" of a Panel. I am getting the required color from XML file as a string (like "red", "blue" etc.). While creating the panel, I am painting it using this code: Strip.Paint += (sender,…
Marek Buchtela
  • 973
  • 3
  • 19
  • 42
0
votes
1 answer

Rectangle wont draw over a panel

I need to draw a rectangle around the edge of a panel created dynamically during runtime. First of all, I get a color in hexa code. I am converting it into ARGB using a code I found here on stackoverflow in similiar question: string color = *getting…
Marek Buchtela
  • 973
  • 3
  • 19
  • 42
0
votes
1 answer

Java - Rectangles on screen move with player

I have made a 2D Java game where I have a rectangle on a 2D map which has obstacles, I have been setting up collisions with rectangles and they have not been working, after some more experimenting I soon realised that the rectangles I made for my…
Rahul Khosla
  • 349
  • 9
  • 21
0
votes
2 answers

Vector math and rectangles

I know this is more high school math(wow been a long time since I was there) but I am trying to solve this programatically so I am reaching out to the collective knowledge of stackoverflow Given this layout: Midpoint is my reference point and in an…
Armychimp
  • 123
  • 2
  • 6
0
votes
2 answers

collision with rotated rectangle

So basically, I am doing my first xna game and it's an arkanoid game. My ball right now is a square that rotate. Unfortunately, it's impossible to correctly detect the collision of a rotated rectangle in xna. I found thing about scalars but I am…
ESD
  • 675
  • 2
  • 12
  • 35
0
votes
2 answers

Image flipping when convert image to base64

I have a rectangle and fill it with a image
Niloo
  • 1,205
  • 5
  • 29
  • 53
0
votes
1 answer

How to find intersection rectangle(points) of instersecting rectangles

If I have two instersecting rectangles[(x1,y1)(x2,y2)][(x3,y3)(x4,y4)] described by two verticles. How to find a rectangle which is effect of their intasection(get 2 points where these rectangles intersect). Prgramming language does not matter. May…
Yoda
  • 17,363
  • 67
  • 204
  • 344
0
votes
3 answers

How to do you make a click area be only part of a non rectangular part of an image?

I am working with images only and the dimensions of the window that I am using to view my application may be different on different systems. I have a mouse action listener that is listening for clicks on the main view of my program. I have a rounded…
Pillager225
  • 439
  • 1
  • 3
  • 15
0
votes
3 answers

Defining a control template for a rectangle in XAML

In my current project, I have this XAML file where I define the visual style that must be applied to different types of custom widgets. For example, the style for a 'DirectLineButton' (a custom class that inherits from WPF's Button) is as follows: …
Nacho1984
  • 111
  • 6
  • 17
0
votes
1 answer

How can I generate a rectangle and a text center aligned in the rectangle in php?(not a text box)

I am trying to create a function that generates an rectangle with some text on it. I have the following function:
Cristina Ursu
  • 201
  • 2
  • 6
  • 18
0
votes
3 answers

Rectangle object throws error saying it can't find the .contains() method in java

I'm trying to make an section of code in mouseClicked remove any rectangles clicked on from a Vector. All the rectangles are properly stored in the vector and the point I'm checking for is valid when I run the program. Looking at the documentation,…
Alex Kibler
  • 4,674
  • 9
  • 44
  • 74
0
votes
1 answer

SeekBar: change apperarance in code with drawable rectangles

I am a beginner at android, but hoping to release an app shortly. My problem is, that I would like to have a seekbar with colored areas according to user/database input. I have tried some things with ShapeDrawable but I am comletely lost and the…
NMKloster
  • 73
  • 1
  • 10
0
votes
2 answers

Table, rectangle placed on top of an image is not coming properly in preview mode in SSRS

I wanted to draw a rectangle with rounded corners in SSRS. But, after lot of research i got to know that currently there is no property for that. So, i am trying to use an image of a rectangle with rounded corners and on top of that trying to align…
0
votes
1 answer

OpenLayers: two GeoJSON Layers, one transparent on both

I have a GPX Track (Startpoint == Endpoint) converted to GeoJSON. I now want to display this track on a map where only by the trac enclosed map shown. The rest should be white. So far I have the following: