Questions tagged [bounds]

In user interfaces and graphics, bounds refer to the size and location of a window or view.

In user interfaces and graphics, bounds refers to the size and location of a window or view. In 2D graphics, this is broken down into four parts. Combinations often used include:

  • x-location, y-location, width, and height.
  • x-location, y-location, right, bottom.

Likewise, in 3D graphics, bounds are often broken into 6 components:

  • x, y, z, width, height, depth
769 questions
-1
votes
1 answer

How to fix TypeError: expected str, bytes or os.PathLike object, not PngImageFile in python

Please find below code def get_document_bounds(image, feature): # [START vision_document_text_tutorial_detect_bounds] """Returns document bounds given an image.""" os.environ['GOOGLE_APPLICATION_CREDENTIALS']=r'C:\DSpython\bounds.json' …
-1
votes
1 answer

Circle and Rectangle intersection code is not working?

Why is my code not detecting that the circle and rectangle has intersected? public static boolean RectCircleColliding(Circle circle, Rectangle rect) { double distX = Math.abs(circle.getCenterX() - rect.getX() - rect.getWidth()/2); double…
Janine
  • 19
  • 4
-1
votes
1 answer

Need help understanding this this function

Dim i as Long, arr(5) As Long for i = 1 to 6 arr(i-1) = i-1 next console.writeLine(arr(LBound(arr)+5) + arr(UBound(arr)-2)) I understand the output is 8 but could someone explain why it is 8, Lbound and UBound, this type of question comes up…
loco3424
  • 23
  • 2
  • 6
-1
votes
1 answer

Boundaries for background

I am using as3 and try to drag the background within the screen. What am I doing wrong? Here is my code: bg.startDrag(false, new Rectangle(-bg.width + stage.stageWidth, stage.stageHeight, bg.width - stage.stageWidth, bg.height -…
-1
votes
1 answer

Welch Bounds for correlations

I am working on correlations and trying to find optimized codes for transmission. In this regard, Welch lays down a bound for correlations, based on number of sequences and the length of these communication sequences. The proof is vaguely given in…
Sal
  • 35
  • 8
-1
votes
1 answer

collision and intersection of player and squares

I am making a game where a player must dodge squares that are falling from the sky. I am trying to make it so that when the player intersects or collides with a falling square, the program will notice. I realize that i have to get the bounds of the…
Karavi
  • 29
  • 7
-1
votes
2 answers

how to add to the x bounds of a jlabel upon button press

What I want to accomplish is simple, I press a JButton (called 'right') and the x bounds of a JLabel is increased by 100, effectively moving the JLabel 100 pixels to the right. I have been experimenting with stuff such as : if(clicked ==…
Connor W
  • 21
  • 3
-1
votes
1 answer

Google Maps: Centering Map on Dynamic Markers

I'm trying to ensure that the map is centered on the markers that have been dynamically added. The markers themselves are added to the map perfectly, but the map keep centering in the middle of the pacific ocean. I don't think initiating the bounds…
dcolumbus
  • 9,596
  • 26
  • 100
  • 165
-1
votes
1 answer

Set google map zoom dynamically

It's possible to define a level of zoom depending of the height of polygon shapes (administrative boundaries)? This polygon going to be completely displayed into the map's div.
Kévin Vilela Pinto
  • 326
  • 1
  • 6
  • 21
-1
votes
1 answer

Google maps returns same coordinates when hidden

I have a google map on the right part of the screen and house listings on the left similar like airbnb. When user moves the google map the listings are refreshed with AJAX request. I would like to hide the google map on small screen devices. But…
Shalafister's
  • 761
  • 1
  • 7
  • 34
-1
votes
1 answer

Google Map API Rectangle Class

I have a draggable rectangle on my map. If the user drags the rectangle into a square shape, I know both sides are equal. How can I determine the length of one side compared to the other? I can use getBounds and probably work something out with…
-1
votes
1 answer

What's the meaning of "view.superview.bounds = view.bounds"

I use a third party Code , this code has such a paragraph : view.superview.bounds = view.bounds I don't know what it means ? Could you help me please ?
user5465320
  • 719
  • 2
  • 7
  • 15
-1
votes
1 answer

Algorithmic Complexity Big O, Little O, Big Omega, Little Omega, Theta

Here's the question I'm working with For each pair of expressions, indicate whether A is O, o, Ω, ω, or Θ of B. I understand is pretty much the upper bound and omega is the lower bound and theta is both upper and lower bounds. I'm confused on what…
Jake Senior
  • 223
  • 4
  • 11
-1
votes
1 answer

Android Google Maps get expanded boundary co-ordinates

I am using Google Maps v2 in my application. When the user pans or zooms on the screen I would like to get the map expanded (by x Km) bounding box. Let's say the black rectangle in this picture https://i.stack.imgur.com/YCtkf.png represents the map…
Nabil Echaouch
  • 108
  • 1
  • 7
-1
votes
1 answer

Java "exception in thread "main"" error fix

Currently I am working on a application which allows technical manuals to be added, stored, borrowed, returned to a virtual library. Currently I am working on the section which allows the user to return a book they have previously borrowed. When…
Oscar
  • 511
  • 2
  • 10
  • 25