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
4
votes
2 answers

Adding a TabBarController as the Subview of a View

I am loading a splash screen when my app starts. Then I want to load a TabBarController and it's ViewControllers. However, my TabBarController window does not scale to the screen size. Probably 3/4 of the TabBar at the bottom is getting cut…
Bryan
  • 17,201
  • 24
  • 97
  • 123
4
votes
1 answer

set minimum limit for violin plot ggplot

I'd like to set the minimum bounds for a violin plot, similar to this question: set only lower bound of a limit for ggplot For this: p <- ggplot(somedf, aes(factor(user1), pq)) + aes(ymin = -50) p + geom_violin(aes(fill = user1))+…
d-cubed
  • 1,034
  • 5
  • 30
  • 58
4
votes
1 answer

When to Use Bound and When to use Frame

I have found out that The bounds of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0). The frame of an UIView is the rectangle, expressed as a location (x,y) and size…
Raj
  • 1,119
  • 1
  • 15
  • 32
4
votes
2 answers

android set bounds for one layer of layer drawable

I'm trying to use a LayerDrawable for a custom UI widget and have one layer be drawn with different bounds than the other layers, but it doesn't seem to be working. Essentially, my code does this: int left, top, right, bottom; /*... do some math ...…
Karakuri
  • 38,365
  • 12
  • 84
  • 104
4
votes
3 answers

iOS: Orientation get future self.view.bounds

Background: I wanted to animate the change in my content along with the orientation. My content position is relative to the self.view.bounds. Problem: In order to animate the content along with the bounds, I would need to know what would the bounds…
Byte
  • 2,920
  • 3
  • 33
  • 55
3
votes
1 answer

Google Maps - search within bounds / viewport

I want my search to only return hits within the map/viewport. I zoom in over Britain and search for London with the map bounds, but the response also return 3 hits in the US. How do I limit the search? Code: function codeAddress(){ geocoder =…
3
votes
1 answer

C# Secondary Monitor Bounds Issue

I have made a bouncing screensaver in C#. When there is only a single monitor to display it works perfectly. However, when I have a dual monitor display the bounds do not work properly. The position of secondary monitor seems to have an effect…
spassen
  • 1,550
  • 8
  • 20
  • 32
3
votes
3 answers

the frame.origin.y change on when I change UIVIew's bounds.size.height

(my english is not very well LOL) i defined a UIView object as a subview, when i change the subview.bounds.size.height, the subview.frame.origin.y changed, is there something wrong in my code? here is my code: - (IBAction)touch { static int i =…
LekHo
  • 31
  • 1
  • 2
3
votes
2 answers

Android how to get bounds of imageview with matrix

I have an ImageView with scaletype set to matrix, and would like to get a Rect with the bounds of the image after the transformation of the matrix. How do I get such a rect? thanks.
saarraz1
  • 2,999
  • 6
  • 29
  • 44
3
votes
2 answers

UIScrollView Interaction Area does not update with frame/contentSize

I have a UIScrollView which starts with a portrait aspect and which I subsequently (after device rotation) move to another frame which is a landscape aspect. Accordingly the content view (A UIView inside the UIScrollView) is updated and I set the…
Damo
  • 12,840
  • 3
  • 51
  • 62
3
votes
1 answer

Scala: Constraining a generic type parameter to a type within another parameter

I'm still trying to grasp the Scala language, so please bear with me and all my questions. Can I reference an abstract type from one type parameter in the bound for another? For instance, is there a way in which the following code can be made to…
Eyvind
  • 5,221
  • 5
  • 40
  • 59
3
votes
2 answers

Programmatically reveal a UIView

I am attempting to reveal (through animation) a UIView. Specifically I want to show the center portion of the view and then slowly reveal the outer edges of it (sort of like pulling back a curtain). My first attempt was to simply set the bounds rect…
mag725
  • 695
  • 2
  • 9
  • 22
3
votes
4 answers

How to check if data is in range

I was wondering if there is any neat way to check is data is in allowed range. I mean in c# we can represent data from 0001-01-01 to (I think) 9999-01-01. However if we try to do something like that DateTime result =…
inferno
  • 1,221
  • 3
  • 9
  • 6
3
votes
1 answer

Julia For-loops used for accessing 1D Arrays

I am trying to run a 2 for loops to access 2 elements within an array, (e.g.) x = 100 for i in eachindex(x-1) for j in 2:x doSomething = Array[i] + Array[j] end end And often (not always) I get this error or similar: LoadError: BoundsError:…
Adrian Azza
  • 109
  • 7
3
votes
1 answer

Is there a performant/mathematical way to find which tiles on a grid that a rotated rectangle overlaps?

I'm trying to work out which tiles a rectangle overlaps. Right now I'm just taking the mix/max bounds of the rect, and iterating through the grid tiles that are within those bounds. And for each tile I check whether the tile rectangle intersects…
user23432432
  • 125
  • 2
  • 8