graphics

Exact dimensions of linetype spacing and size

与世无争的帅哥 提交于 2020-08-07 09:51:26
问题 This is mostly a follow-up question on a previous one. Given that in ggplot2 and grid there are different linetypes and spacings vary between line sizes, what is their relationship? There are two things I do not quite understand. How is the line size defined? If I were to draw a straight vertical line and substitute it by a rectangle, what should be the width of the rectangle to get the equivalent of the line's size? Especially, how does the lwd = 1 or lwd = 10 I pass to par() / gpar() relate

Swing/AWT Double Buffering very slow on Linux

不羁的心 提交于 2020-08-05 05:42:49
问题 I have an AWT Canvas within a JFrame (I know that Swing and AWT shouldn't be used simultaneously but it works well on Windows so I don't think the problem is caused by this) and using a BufferStrategy from the Canvas to draw on screen. It runs pretty smooth on Windows but when I tried to run it on Ubuntu 12.04 it became unbearably slow. Not just the rendering but JFrame is also unresponsive. When I comment out the double buffering and rendering part it's smooth again. I have an ATI graphics

Positioning and highlighting of TreeView node text with OwnerDrawText mode

柔情痞子 提交于 2020-07-30 10:34:09
问题 My Problem I'm trying to create a TreeView that will bold portions of node text that match a search term. My code was adopted from this question. I have the same/similar problem with or without an ImageList used, but I'll post the unused version here. When I render my text, I get something like this where the last part of the text is cut off, but only for some of the nodes. i.e. Version looks ok, but the rest have differing amounts of text cut off from the bounds. I think my TextFormatFlags

How to get the intersection point? Ray Triangle Intersection C++

痞子三分冷 提交于 2020-07-24 02:06:58
问题 I would like to get the intersection point on a triangle when a ray go through it. I followed the on line tutorial and made a function, but I could not get the correct coordinates of intersection point. For example, I should get the intersection point (0, 3, -1), if I use ray origin (0, 2, -1), ray direction (0, 1, 0), triangle vertices p0 (0, 3, 0), p1 (-0.5, 3, -1), p2 (0.5, 3, -1). However, I have got the intersection point (0, 7, -1), which was not correct. I appreciate your time and help

How to get the intersection point? Ray Triangle Intersection C++

旧时模样 提交于 2020-07-24 02:02:47
问题 I would like to get the intersection point on a triangle when a ray go through it. I followed the on line tutorial and made a function, but I could not get the correct coordinates of intersection point. For example, I should get the intersection point (0, 3, -1), if I use ray origin (0, 2, -1), ray direction (0, 1, 0), triangle vertices p0 (0, 3, 0), p1 (-0.5, 3, -1), p2 (0.5, 3, -1). However, I have got the intersection point (0, 7, -1), which was not correct. I appreciate your time and help

How to get the intersection point? Ray Triangle Intersection C++

最后都变了- 提交于 2020-07-24 02:01:45
问题 I would like to get the intersection point on a triangle when a ray go through it. I followed the on line tutorial and made a function, but I could not get the correct coordinates of intersection point. For example, I should get the intersection point (0, 3, -1), if I use ray origin (0, 2, -1), ray direction (0, 1, 0), triangle vertices p0 (0, 3, 0), p1 (-0.5, 3, -1), p2 (0.5, 3, -1). However, I have got the intersection point (0, 7, -1), which was not correct. I appreciate your time and help

How can I gray-out a disabled PictureBox used as Button?

…衆ロ難τιáo~ 提交于 2020-07-23 07:25:11
问题 I'm using Picturebox control as a Button in my app's main dashboard. The PictureBox has of course an Image that identifies the Button function. If I use normal Button controls, when disabled, the Buttons' Image it grayed out automatically. This doesn't happen using a PictureBox. How can I generated the same effect using a Picturebox. 回答1: Option 1: CustomControl (PictureBox) + ColorMatrix Since you don't want to use a Button, which would gray-out the Image for you when the Control is disabled

How can I gray-out a disabled PictureBox used as Button?

萝らか妹 提交于 2020-07-23 07:23:09
问题 I'm using Picturebox control as a Button in my app's main dashboard. The PictureBox has of course an Image that identifies the Button function. If I use normal Button controls, when disabled, the Buttons' Image it grayed out automatically. This doesn't happen using a PictureBox. How can I generated the same effect using a Picturebox. 回答1: Option 1: CustomControl (PictureBox) + ColorMatrix Since you don't want to use a Button, which would gray-out the Image for you when the Control is disabled

How can I gray-out a disabled PictureBox used as Button?

风格不统一 提交于 2020-07-23 07:21:18
问题 I'm using Picturebox control as a Button in my app's main dashboard. The PictureBox has of course an Image that identifies the Button function. If I use normal Button controls, when disabled, the Buttons' Image it grayed out automatically. This doesn't happen using a PictureBox. How can I generated the same effect using a Picturebox. 回答1: Option 1: CustomControl (PictureBox) + ColorMatrix Since you don't want to use a Button, which would gray-out the Image for you when the Control is disabled

How to improve graphics quality

心不动则不痛 提交于 2020-07-23 06:48:13
问题 First look at the difference: The top's been created in WPF and the bottom with Qt. All Path Data has been taken from materialdesignicons. For WPF I've taken XAML and for QtQuick SVG . For DropShadow I've specified a value for samples property BUT for svg and rotated Text there's no such property. Is this the difference between OpenGL/CL/etc. and DirectX or something else? The machine I'm working on has both Intel and NVIDIA! I want my QtQuick app to use NVIDIA to compute efficiently and