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

how to keep dragged TitleWindow within Flex app boundary

I am using PopupManager in FB4 to display a custom dialog. popwin = new TitleWindow(); popwin.addElement(myCustomDialog); PopUpManager.addPopUp(popwin,this,false); PopUpManager.centerPopUp(popwin); It's possible to drag the…
Tim
  • 429
  • 6
  • 19
9
votes
1 answer

CGAffineTransform changes view.bounds?

Views have both a frame (coordinates in superview's coordinate system) and bounds (coordinates in own coordinate system) property, but if you transform a view, you should not use or rely on the frame property anymore. If you are using…
eugene
  • 39,839
  • 68
  • 255
  • 489
8
votes
1 answer

Determining if a point in a view is within a subviews bounds

Suppose I have a UIView parentView and a subview childView that is rotated at some unknown angle relative to parentView. What is the most efficient way to determine if a point within parentView (I know the coordinates in parentView's coordinate…
Victor Engel
  • 2,037
  • 2
  • 25
  • 46
8
votes
1 answer

Can you get the size of the visible area of a clipped control?

Is there a way to get the size of the visible portion of a clipped control in WinForms? A very simple example: place a control on a form and make the form width smaller than the control width. How do you get the width of the visible area of the…
Igby Largeman
  • 16,495
  • 3
  • 60
  • 86
7
votes
1 answer

Odd Behavior From Splint Bounds Checking

Any splint experts out there?? I'm trying to use splint to statically analyze a large project I have in C. I'm seeing an excess number of bounds checking errors that are obviously not bounds errors. I wrote a small test program to try to isolate the…
Samuel
  • 8,063
  • 8
  • 45
  • 41
7
votes
2 answers

iOS Touches (Auto) Offset on iPad

There is almost no information out there about this, so here is my problem: I'm working on a 2 player 'sit across from eachother' ipad game and the player who is on the opposite side has a hard time tapping buttons... because it appears that Apple…
cclogg
  • 709
  • 2
  • 7
  • 11
7
votes
3 answers

Why is self.bounds.size.height not taking into account the UINavigationView nav bar in this code?

I have a configuration UITableView that can launch a colour picker via a UINavigationController approach: [self.navigationController pushViewController:colorPickerViewController animated:YES]; [colorPickerViewController release]; The effect of this…
Greg
  • 34,042
  • 79
  • 253
  • 454
7
votes
1 answer

In Rust, how can I restrict a generic T to allow modulus?

As an exercism exercise, I'm currently trying to filter an iterator according to whether the value is even in order to produce a new iterator. My function currently looks like: pub fn evens(iter: impl Iterator) -> impl Iterator
Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
7
votes
1 answer

javafx full screen on SECOND screen

For the life of me, I can't seem to get help on this. I have a JavaFX screen and I am trying to get to show fullscreen on my 2nd monitor. I tried the following based on other recommendations but to no avail. I know the coordinates are right but it…
darthgamer64
  • 145
  • 1
  • 8
7
votes
3 answers

Getting map zoom level for given bounds on Android like on JS Google Maps API: map.getBoundsZoomLevel(bounds)

I have a cluster marker that defines a bounding rectangle containing a group of markers. The cluster has a center (lat,lon), a marker count and a latitude and longitude span to calculate the bounds. The Google Maps API (JS) has a function called…
Thorsten
  • 71
  • 1
  • 3
7
votes
2 answers

In Java generic class, add extra generic constraints at constructor level?

I have an interface called Bar and a generic class Foo parameterized on a type that is a Bar: class Foo { } My class has a general purpose constructor that takes a Class and a Stream: class Foo { B[] bs; …
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
7
votes
3 answers

Getting the bounds of a polyline in Google Maps API v3

Is there any easy ways to find the bounding box of a polyline using Google Maps API v3? I'm working on a project where I need to update the bounds as data is added and removed from the map. This is pretty easy by just doing bd.extend(point) where bd…
Ian Burris
  • 6,325
  • 21
  • 59
  • 80
7
votes
1 answer

How to calculate center of bounds without GoogleMaps?

I have the following bounds: var bounds = { southwest: {lat: 54.69726685890506, lng: -2.7379201682812226}, northeast: {lat: 55.38942944437183, lng: -1.2456105979687226} }; By using google maps API I could calculate canter of the bounds…
Erik
  • 14,060
  • 49
  • 132
  • 218
7
votes
1 answer

d3.js geoJSON and bounds

I have successfully loaded geoJSON files loaded the feature collection into a d3.geo.path() The problem with my current implementation is that it starts off the scaling such that the path is a point, and I have to zoom in each time. Now I know…
Justin
  • 287
  • 3
  • 11
6
votes
1 answer

iPad: [UIScreen mainScreen].bounds returns wrong co-ordinates

[UIScreen mainScreen].bounds returns (0,0,768,1024) even when the iPad is in Landscape mode. It should return (0,0,1024,768) but instead it returns (0,0,768,1024). What could be wrong?
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
1 2
3
51 52