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
vote
2 answers

When does bounds get updated?

I am loading a view as soon as the user rotates to landscape but when I use view.bounds in viewDidLoad it is still in portrait. Here the code where I load the view which is triggered from a notification - (void)orientationChanged:(NSNotification…
Chris
  • 3,581
  • 8
  • 30
  • 51
1
vote
2 answers

Setting NSView default property value based on initial bounds

I need to set a property of an NSView loaded from a Nib calculated using its initial bounds. Its bounds is still null inside - (void)awakeFromNib, so what is the first point in the view's lifecycle that I can access its bounds?
Undistraction
  • 42,754
  • 56
  • 195
  • 331
1
vote
1 answer

Applying bounds to scipy.optimize.curve_fit() leads to "ValueError: `x0` must have at most 1 dimension."

Somehow the following code raises the error "ValueError: x0 must have at most 1 dimension." as soon as I add bounds to my Fit. I have absolutely no idea what I'm doing wrong here. The Goal is to restrain the fit of the 8 Lorentzian Curves to the…
1
vote
1 answer

How to get all bounds from boost::rtree

I have a built boost rtree: using CBGPoint3d = boost::geometry::model::point; using CBGBox3D = boost::geometry::model::box; using CBGTreeItem = std::pair
1
vote
1 answer

Can Someone Explain Why .intersects returns true here?

Image of an example of issue .intersects is called on both of these nodes and returns true. I used getBoundsInParent() for both. Can someone help me fix this issue. I feel it as something to do with getBoundsInParent() not returning accurate bounds…
BigWinnz101
  • 61
  • 1
  • 5
1
vote
0 answers

Fitting empirical distribution to theoretical ones with Scipy (Python) with bounds of parameters

INTRODUCTION: I have a list of 10 numbers. I would like to fit genpareto. PROBLEM: model has been math with not provide shape ( green shape). I would like to put bounds on shape parameter during fit. Based on shape parameter the curve get the…
Michal
  • 11
  • 2
1
vote
4 answers

AS3 libraries with a startDrag() equivalent that has non-rectangular boundaries (ie: circular)?

I'm just trying to avoid rolling my own dragging functionality. Does anyone know of any libraries out there that have a startDrag() equivalent where you can use, say, a circular radius for the drag bounds, rather than a rectangular box?
Tom Auger
  • 19,421
  • 22
  • 81
  • 104
1
vote
1 answer

Where to set bounds of a drawable in a custom view

Overview: I`m trying to create some simple shapes (squares and triangles) and then use them as the background image for an activity. The sizes of the shapes depend on the width and height of the screen. The problem is, even though I am setting the…
odiggity
  • 4,117
  • 7
  • 34
  • 41
1
vote
0 answers

CGBitmapContextCreate returns nil on anything but an iPhone 4 photo

I'm pretty sure this is a stupid coding error due to the fact i'm a bit of a newbie in iOS and especially on Quartz. I have the following code - Which works on photos i've taken with my iPhone's camera, but it returns nil (in ctx) when im creating a…
Shai Mishali
  • 9,224
  • 4
  • 56
  • 83
1
vote
1 answer

Google Maps V3 Javascript Getting Bounds to work with KML and Markers

I am making a map where I have the KML load and the markers load on the same canvas in which I want the boundary to be however big the markers even though the kml is on the canvas. I'm using this in conjunction with php so there's a bit of php in…
Dan
  • 183
  • 3
  • 14
1
vote
2 answers

Changing the size of UIScreen on rotation

I am making an iPad app that starts out in the portrait orientation but can rotate over to the landscape orientation. In -(void) loadView, I call the function drawView. In drawView, I have this line of code: CGRect r = [[UIScreen mainScreen]…
Jack Humphries
  • 13,056
  • 14
  • 84
  • 125
1
vote
2 answers

How to create larger map bounds with a certain padding on Google Maps(v3)?

I want to create map bounds that can cover a little more area than the current viewport using a padding of xx pixel. How to do that on Google maps (v3)?
Vaeianor
  • 169
  • 1
  • 4
  • 15
1
vote
1 answer

Implement a trait for generic types that implement a trait for a specific type

The title to this question reads very similar to many related questions, but I haven't found one that discusses this specific issue. I have a Color type that is very simply defined like this: pub struct Color { red: u8, green: u8, blue:…
iFreilicht
  • 13,271
  • 9
  • 43
  • 74
1
vote
0 answers

How to add a constraint for a variable in an ODE in python?

I need to solve a system of differential equations and I have a function that returns dx/dt and du/dt, but I need to add the constraint that u is in the interval [0,1]. How can I do that? So far I've been using odeint from scipy.integrate to solve…
user606273
  • 143
  • 6
1
vote
1 answer

How to specify the bounds of an array

There i try to specify bounds of an array: public string[] scaleChanged() { int j =0; for(int i=0;i<42;i++) { if(MinScale == ItemScale[i]) //MinScale is the min value I want to use to start array { …