z-order

DrawingContext.DrawLine: Pen has no full opacity?

和自甴很熟 提交于 2019-12-04 10:09:48
when I draw something like that (just random drawings here): public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DrawingVisual visual = new DrawingVisual(); DrawingContext context = visual.RenderOpen(); Pen pen = new Pen(Brushes.Black, 1); context.DrawEllipse(Brushes.YellowGreen, pen, new Point(0,0), 40, 40); for (int i = 0; i <= 100 - 1; i++) context.DrawLine(new Pen(Brushes.Black, 1), new Point(0, i), new Point(i, i)); context.Close(); RenderTargetBitmap bmp = new RenderTargetBitmap(100, 100, 96, 96, PixelFormats.Pbgra32); bmp.Render(visual); image1.Source

Why doesn't Word “come to front” when we activate it?

久未见 提交于 2019-12-03 14:39:25
Our winforms application interacts with MS Word and we run this code when a document is generated and we want to show it in Word in front of our application: [setup w as a Word interop object] w.Visible = True w.Activate() When rolled out to XP machines running Office 2007 this works as intended. On Win7 machines running Office 2010 the document loads behind our application and flashes on the taskbar. Any ideas? I stumbled upon a similar problem recently. My .NET program called a COM application, but on Win7 it would sometimes neither show up in taskbar nor on the desktop at all. I wasn't

View bring to front doesnt work

丶灬走出姿态 提交于 2019-12-03 04:39:29
I want to change z order of some views during animation On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top. This is what i am trying. myView.bringToFront(); ((View)myView.getParent()).invalidate(); How to make it work on older devices ? /** * Change the view's z order in the tree, so it's on top of other sibling * views. This ordering change may affect layout, if the parent container * uses an order-dependent layout scheme (e.g., LinearLayout). Prior * to {@link android.os.Build.VERSION_CODES#KITKAT} this * method

How to make window absolute topmost?

别等时光非礼了梦想. 提交于 2019-12-02 01:27:34
问题 I use the SetWindowPos api to make my window topmost with the HWND_TOPMOST param. It works fine, but still tooltips are on top of it. How to make my window on top of all. Is there an api that I'm missing? Edit: I fixed it with a timer checking the foreground window and then setting mine to topmost. 回答1: There is no way to do that, as noted in the Old New Thing blog. TopMost is TopMost. If two windows are competing one must loose. There is no secret MoreTopMost constant. 来源: https:/

How do I bring an item to the front in wpf?

风流意气都作罢 提交于 2019-12-01 15:20:11
I simply have two grid on top of one another. Given one state of the world, I want grid A to be on top, given another state of the world, I want grid B to be on top. In the old days we could just call grid.BringToFront(), but that doesn't exist anymore, and I can't figure out any way to make that happen. The best I can figure, I need to create my own custom classes to allow this functionality, but that seems like major overkill for something that used to be so simple. Ifeanyi Echeruo You can use the Panel.ZIndex property to change the display order of elements in a panel You have to use the Z

How do I bring an item to the front in wpf?

狂风中的少年 提交于 2019-12-01 14:14:50
问题 I simply have two grid on top of one another. Given one state of the world, I want grid A to be on top, given another state of the world, I want grid B to be on top. In the old days we could just call grid.BringToFront(), but that doesn't exist anymore, and I can't figure out any way to make that happen. The best I can figure, I need to create my own custom classes to allow this functionality, but that seems like major overkill for something that used to be so simple. 回答1: You can use the

Android Click Through PopupWindow

蓝咒 提交于 2019-11-30 12:45:51
I have created a class that extends popupwindow. its constructor looks something like the following super(builder.context.get()); this.setWindowLayoutMode(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); setFocusable(true); setBackgroundDrawable(new BitmapDrawable()); setTouchInterceptor(onTouchListener); FrameLayout frameLayout = new FrameLayout(builder.context.get()); LayoutInflater inflater = (LayoutInflater) builder.context.get().getSystemService( Context.LAYOUT_INFLATER_SERVICE); View overlayBase = inflater.inflate(R.layout.tutorial_view_items, null, false);

How do I let my matplotlib plot go beyond the axes?

狂风中的少年 提交于 2019-11-30 10:59:43
I have to translate an image plotting script from matlab to matplotlib/pylab, and I'm trying to achieve the same effect as the matlab image below: As you can see, the z order of the plots seem to be higher than the z order of the grid, so the markers are not hidden by the axes. However, I can't figure out a way to do the same with my matplotlib image: I'm wondering if it is possible to get the same display without having to increase the limits of the y axis. To get the marker to show beyond the axes you can turn the clipping off. This can be done using the keyword argument in the plot command

In openGL, how can you get items to draw back to front?

烈酒焚心 提交于 2019-11-30 08:49:52
By default it seems that objects are drawn front to back. I am drawing a 2-D UI object and would like to create it back to front. For example I could create a white square first then create a slightly smaller black square on top of it thus creating a black pane with a white border. This post had some discussion on it and described this order as the "Painter's Algorithm" but ultimately the example they gave simply rendered the objects in reverse order to get the desired effect. I figure back to front (first objects go in back, subsequent objects get draw on top) rendering can be achieved via

How to properly use setZOrderMediaOverlay on Android?

你。 提交于 2019-11-30 07:17:59
Like many others, I am trying to draw 3D objects (using GLSurfaceView) on camera preview (using SurfaceView), along with some buttons placed on top. I actually got a prototype working, but I could not get the onResume working correctly. After a resume, GLSurfaceView stays behind and is not visible anymore. I know that it is working, because I can see the drawing fine if I remove the SurfaceView from the layout. The target is Nexus One, running stock 2.3.3 ROM. Here's the layout xml: <com.example.cameratest.GLPreview android:id="@+id/cubes" android:layout_width="fill_parent" android:layout