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
1 answer

Confine a gaussian fit with curve_fit

in the framework of my bachelor's thesis, I need to evaluate my data with python. Unfortunately there's no suiting script of my fellow students yet and I'm quite new to programming. I have this data set and I'm trying to fit it with a gaussian by…
Kike
  • 53
  • 1
  • 5
4
votes
1 answer

javaFX- what is getBoundsInLocal() ,getBoundsInParent() method?

A image (here the node named hero) is moved according to the KEY pressed in keyboard. But a method named getBoundsInLocal() is used. I can't truly understand the purpose of this method . Does it helps to get the width and height of the image…
i_love_CODE
  • 43
  • 1
  • 5
4
votes
2 answers

How do I create a CCSprite to set bounds?

How can I create a CCSprite that scales the image to fit within input bounds, i.e. if I want a CCSprite that is width = 70 and height = 50 and scales the image in the file to 70,50. Is there a simple way to do this other than compute the scale…
Joey
  • 7,537
  • 12
  • 52
  • 104
4
votes
2 answers

index 4 is out of bounds for axis 1 with size 4 Code with Double Sum

Hi I have the following function which produces an out of bounds error: import numpy as np import pylab as plt import scipy import math import sympy as sy T = sy.Symbol('T') rho = sy.Symbol('rho') g_T =…
Shaun
  • 461
  • 3
  • 5
  • 22
4
votes
1 answer

What is the correlation between bounds.size and frame.size when animating UICollectionViewCell

I've read on several posts (like https://stackoverflow.com/a/5340339/1084822 and https://stackoverflow.com/a/15582466/1084822) that to resize a UIView with animation, we can't animate the frame and we must do it with a mix of bounds.size,…
4
votes
1 answer

Changing a views bounds affect the frame

I'm trying to understand how a view responds to its bounds being changed. If I change the bounds origin of a view, will it change the frame origin accordingly? E.g. UIView *greenView = [[UIView alloc] initWithFrame:CGRectMake(150, 150, 150,…
Smashkon
  • 115
  • 1
  • 7
4
votes
1 answer

Java application Error while reading a csv file using openCSV CSVReader ... java.lang.ArrayIndexOutOfBoundsException

I get an error in my Java application when i try to read a column from each line of my csv file java.lang.ArrayIndexOutOfBoundsException: 1 My code is like this using OpenCSV public void insertOjd(String fichierEntree) throws SQLException { …
Stim
  • 63
  • 8
4
votes
1 answer

Android ImageView scaling conflict

I am creating ImageView in code: ImageView vlogo = new ImageView(v.getContext()); RelativeLayout.LayoutParams vlogoParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, …
4
votes
1 answer

CABasicAnimation with keypath "bounds" not working

I have the following code to animation bounds property of CALayer using CABasicAnimation. But the code doesn't seem to work. let fromValue = textLabel.layer.bounds let toValue = CGRectMake(textLabel.layer.bounds.origin.x,…
KSC
  • 406
  • 1
  • 6
  • 8
4
votes
2 answers

Keep javafx window inside screen bounds

I'm programming a javafx application, and I'd like to keep my window from going outside the screen bounds, since there isn't much use for this. So, for example, the window shouldn't be able to be dragged so that half of it is off the screen. public…
LilSweden
  • 625
  • 1
  • 7
  • 15
4
votes
1 answer

Android maps - Markers Bounds at the center of top half of map area

I have Android Map Extension attached under actionBar. I have couple of markers, lets say 2000. Than I have ArrayList of selected 3 markers upon some constant condition, nevermind. I want to zoom and move map to include this selected 3 markers at…
4
votes
1 answer

Bounds in Android. Default scale?

When I set the bounds in a code like the following one, what is the scale?, dp? px?, ShapeDrawable myLine= new ShapeDrawable(new RectShape()); myLine.setBounds(0, 0, 1, MAX_HEIGHT); myLine.draw(canvas);
4
votes
1 answer

[UIScreen mainScreen].bounds vs [UIApplcation sharedApplication].keyWindow.bounds?

I have view that i want to cover entire screen. And i want to set its frame to cover entire screen. Browsing the stack overflow i found these two different ways of setting view frame to cover the screen: [UIScreen mainScreen].bounds [UIApplcation…
MegaManX
  • 8,766
  • 12
  • 51
  • 83
4
votes
2 answers

Can someone explain this css margin behaviour?

A friend of mine had a problem with this simple html/ css task: http://jsfiddle.net/kaHzY/6/ The problem was that the .headline 's margin-top was pushing down the #main div although it should directly follow the nav without any space between. Adding…
Alex
  • 9,911
  • 5
  • 33
  • 52
4
votes
1 answer

How to set the extent of an OpenLayers Map?

I want to pan and zoom an OpenLayers.Map to a given OpenLayer.Bounds. What is a quick way to do this action? I want to see everything that is in the bounds on the map. Cheers!
JHnet
  • 461
  • 6
  • 18