Questions tagged [layer]

This tag is ambiguous. Consider using more specific tags to better reflect the question's content.

This tag is ambiguous. Consider using more specific tags to better reflect the question's content.

If the question relates to Geographic Information Systems, consider whether the question is better suited to the GIS Stack Exchange.

2129 questions
22
votes
4 answers

WinForm UI components layer order

When we add any UI or container in WinForms, the later added component comes over the earlier added components, we can say it is in a higher layer. How to change that layer order or component order after adding components?
Moon
  • 19,518
  • 56
  • 138
  • 200
19
votes
1 answer

How to implement highlighting on UIImage like UIButton does when tapped?

I need to replicate the effect that the UIButton does on an image when tapped, the highlighting. See: The original PNG is a square with alpha background. When I set it as UIButton's image it automatically apply an effect on the non-alpha pixels of…
Felipe Cypriano
  • 2,727
  • 22
  • 32
19
votes
2 answers

How to scale the size of line and point separately in ggplot2

The code is as follows: set.seed(123) d1=data.frame(x=runif(10),y=runif(10),z=runif(10,1,10)) d2=data.frame(x=runif(10),y=runif(10),z=runif(10,100,1000)) ggplot()+geom_point(aes(x,y,size=z),data=d1)+ geom_line(aes(x,y,size=z),data=d2) And the…
Tiger
  • 215
  • 2
  • 8
19
votes
1 answer

DAO & BO (data access layer) - architecture

I'm a little bit confused about an example found on the web - spring & hibernate (point 4. Model & BO & DAO). There are Model, DAO and BO classes (+ DAO and BO interfaces). What I do not clearly understand is why DAO and BO are separated into…
ducin
  • 25,621
  • 41
  • 157
  • 256
19
votes
2 answers

Where to define the interfaces for a repository in an layered architecture?

Background I'm trying to create a simple application to really understand the whole stack of DDD+TDD+etc. My goal is to dynamically inject the DAL repository classes at runtime. This keeps my Domain and Application Services layers testable. I…
17
votes
1 answer

Gimp - Easy way to make many layers visible?

In Gimp, I've created a .xcf file that consists of some 200 layers. Some are visible and some not. Now I want to create a picture that consists of all layers, so I have to make all layers visible. Later I'll have to return to the state where some…
Jogan Thums
  • 227
  • 1
  • 2
  • 9
17
votes
4 answers

ggplot2: Bring one line to the front, but save the colors

Consider the following code: library(ggplot2) foo <- data.frame(x=1:10,A=1:10,B=10:1) ggplot(melt(foo,id.vars="x"),aes(x,value,color=variable))+geom_line(size=5) I want to bring the red line (A) to the front, on top of B (see the cross point),…
Ali
  • 9,440
  • 12
  • 62
  • 92
15
votes
1 answer

openlayers 3 zoom to combined extent

I'm using openlayers 3 to create a map with vector features on top. So far, so good. I have several vector layers, grouped in a variable called projecten. var projecten = new ol.layer.Group({ title: 'Projecten', layers: [ …
user1697335
  • 175
  • 1
  • 1
  • 6
15
votes
4 answers

Android create layers in canvas

I want to learn how can I create layers (like in photoshop) in my android application. I want to achieve one basic thing: when I add an image in my canvas, which will be some figure for example, I want to be able to paint the canvas, but the…
Android-Droid
  • 14,365
  • 41
  • 114
  • 185
14
votes
5 answers

SetPixel is too slow. Is there a faster way to draw to bitmap?

I have a small paint program that I am working on. I am using SetPixel on a bitmap to do that drawing of lines. When the brush size gets large, like 25 pixels across there is a noticeable performance drop. I am wondering if there is a faster way to…
Pyro
  • 339
  • 1
  • 4
  • 12
14
votes
8 answers

Why is MVC so popular?

I was originally going to make this a longer question, but I feel like the shorter I make it, the better you'll understand what I mean. The MVC architectural pattern has 3 dependencies. The View depends on the model. The Controller depends on the…
Mike
  • 19,267
  • 11
  • 56
  • 72
13
votes
3 answers

Implementing a service layer in an MVC architecture

How would one typically implement a service layer in an MVC architecture? Is it one object that serves all requests to underlying business objects? Or is more like an object that serves different service objects that in their turn interact with…
Decent Dabbler
  • 22,532
  • 8
  • 74
  • 106
12
votes
9 answers

What should I keep in mind in order to refactor huge code base?

I'm going to refactor certain parts in a huge code base (18000+ Java classes). Goal is to be able to extract lower layers as independent libraries to be reused in other projects that currently use duplicate of this code base. Especially one part is…
nojevive
  • 3,518
  • 3
  • 22
  • 18
12
votes
2 answers

Javascript Absolute Positioning

I am trying to create a new div layer using JavaScript that can be absolutely positioned on the page after page load. My code is as follows: