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
6
votes
0 answers

Can you prevent std::vector bounds-checking on push_back()?

I know there are ways to either do or not do bounds-checking when indexing a vector, but specifically on push_back(), even if I know the capacity of the vector is large enough (ie., I reserved enough), and I ran a loop pushing back elements into it,…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119
6
votes
4 answers

Image out of bounds after transformation on view

I'm having a problem with displaying my image. I have an Image I want to display full screen. So I have this Imageview with match_parent and 20dp padding. It looks good but when I apply rotation on it, it seems that the bounds of the view doesn't…
Dennis Anderson
  • 1,348
  • 2
  • 14
  • 33
6
votes
3 answers

Google map zoom in between LatLng Bounds

I have two markers on a map that should both show at the same time. This is achieved through : final LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (Marker markerTemp : markers) { …
Miriana Itani
  • 865
  • 9
  • 25
6
votes
2 answers

UIImageView Scale to fill does not clip subviews

I am trying to add some images to my UIImageView. Everything works fine if the png has the same size as the ImageView. But when I insert a bigger image, it is not discarded. This is my code: @IBOutlet weak var PictureView: UIImageView! func…
McLawrence
  • 4,975
  • 7
  • 39
  • 51
6
votes
3 answers

setbounds on google maps api v3

I'm trying to set the bounds of a map fitbounds doesnt work because it puts some space around the bounds therefore doing {{{map.fitBounds(map.getBounds())}}} a few times will quickly zoom the map out I need to be able to…
msaspence
  • 1,424
  • 2
  • 14
  • 25
6
votes
1 answer

Java Generic bound (constraint) for Enum

I'm trying to bound (constrain) a Java generic type variable to be an enum (any enum) and failing. Might you be able to tell me why? import org.supercsv.cellprocessor.ift.CellProcessor; import…
urig
  • 16,016
  • 26
  • 115
  • 184
5
votes
1 answer

Drawing outside a component's bounds

I'm making a component (extending JComponent) which will have some decoration drawn over the top of it and partly outside its bounds. I would like to know if there's a way of drawing outside the component using self-contained code (I don't want to…
Tharwen
  • 3,057
  • 2
  • 24
  • 36
5
votes
2 answers

problem with getting JFrame bounds inside a timer in Netbeans

I want to animate a JFrame to become half-size when i press a button in my programme. I think the easiest way is putting the current bounds of JFrame into a timer and decrease bounds 1 by 1 when the timer running.But when I declare a new timer in…
Thusitha
  • 3,393
  • 3
  • 21
  • 33
5
votes
2 answers

Why are the bounds of an UIView a CGRect and not a CGSize?

Is there a reason why the bounds property of UIView (an NSView) are a CGRect when the only information you'll ever want in that property are the size of that CGRect. Is it just a shortcut for drawing since you'll need a CGRect when drawing? Or just…
gcamp
  • 14,622
  • 4
  • 54
  • 85
5
votes
1 answer

JavaScript: best way to maintain bounds (Google Maps)?

I am using the Google Maps v3 API. I currently am making a request to fetch new data each time a person changes the viewport (by either zooming or shifting the map) and am throwing away the old data I have. This works great, but now I want to cache…
tyronegcarter
  • 3,876
  • 4
  • 21
  • 24
5
votes
1 answer

Not satisfied: inferred type T? is not subtype of Any

To map the result I have implemented sealed generic class : public sealed class ResultMapper { public class Ok(public val value: T, override val response: Response) : Result(),…
QuokMoon
  • 4,387
  • 4
  • 26
  • 50
5
votes
3 answers

Does Intel C++ compiler have bounds checking?

I was wondering, does Intel C++ compiler have bounds checking available? I am working with tons of code evolving for ten years now, and in desperate need for debugging and refactoring. I need any help I can get.
Srki
  • 169
  • 1
  • 4
5
votes
3 answers

Can jQuery copy an element's bounds (position, size, margins, etc.) to another element?

I have an element of an arbitrary type. I'd like to create another element, of either the same or a different type that has the same position and size as the first. The element may or may not be positioned. For example, I might start with a…
DNS
  • 37,249
  • 18
  • 95
  • 132
5
votes
3 answers

How to draw outside of an HTML canvas element?

I have an HTML canvas element and have implemented a brush that captures the mousedown, mousemove, and mouseup events of the canvas element. This all works fine for drawing on the canvas. However, I don't think I like how you can't continue a…
Lawrence Douglas
  • 667
  • 1
  • 7
  • 15
5
votes
5 answers

Google Maps JavaScript API - Automate Zoom Level?

I'm working with multiple map markers. Currently I use map.fitBounds(bounds); in my JavaScript to resize the map. bounds contains multiple LatLng objects. What am i doing wrong? Because it zooms out too far :-( JavaScript source var geocoder,…
NicoJuicy
  • 3,435
  • 4
  • 40
  • 66