visual-artifacts

Grey borders in DrawImage (.NET system.drawing.drawing2D)

浪尽此生 提交于 2020-07-30 08:12:59
问题 I'm trying to create an image on a bitmap using C#. Somehow it always adds grey border on all sides of the image. Many questions have been posted with the solution and I have tried almost all of them but none of them worked. Code that I'm using: Bitmap appearance = new Bitmap(490, 196, PixelFormat.Format32bppArgb); using (Graphics graphics = Graphics.FromImage(appearance)) { graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.SmoothingMode = SmoothingMode.AntiAlias;

Artifacts showing when modifying a custom QGraphicsItem

孤人 提交于 2020-05-29 08:23:21
问题 I'm currently developping a small vector drawing program in wich you can create lines and modify them after creation (those lines are based on a custom QGraphicsItem). For instance, the picture below shows what happens when the leftmost (marked yellow) point of the line is dragged to the right of the screen, effectively lengthening the line : Everything works fine when the point is moved slowly, however, when moved rapidly, some visual artifacts appear : The piece of code I'm using to call

Artifacts showing when modifying a custom QGraphicsItem

为君一笑 提交于 2020-05-29 08:23:12
问题 I'm currently developping a small vector drawing program in wich you can create lines and modify them after creation (those lines are based on a custom QGraphicsItem). For instance, the picture below shows what happens when the leftmost (marked yellow) point of the line is dragged to the right of the screen, effectively lengthening the line : Everything works fine when the point is moved slowly, however, when moved rapidly, some visual artifacts appear : The piece of code I'm using to call

How to avoid visual artifacts of colored border of zoomable UserControl with rounded corners?

笑着哭i 提交于 2020-01-21 08:52:09
问题 I have a Form which contains: a TrackBar (minimum = 1, maximum = 200, represents zoom percent); a UserControl with BorderStyle = BorderStyle.None . Relevant code Form1 From designer code trackBar1.Value = 100; BackColor = Color.Gray; From code-behind private void trackBar1_Scroll(object sender, EventArgs e) { userControl11.SetZoomFactor(trackBar1.Value / 100F); } UserControl1 internal float MyBaseWidth; public UserControl1() { InitializeComponent(); MyBaseWidth = Width; SetZoomFactor(1); }

How to avoid visual artifacts when hosting WPF user controls within a WinForms MDI app?

荒凉一梦 提交于 2019-12-30 01:27:05
问题 When hosting WPF user controls within a WinForms MDI app there is a drawing issue when you have multiple forms that overlap each other that causes very distinct visual artifacts. These artifacts are mostly visible after dragging one child form over another one that also hosts WPF content or by allowing the edges of the child form to be clipped by the main MDI parent when dragging it around. After the drag and drop of the child form is completed the artifacts stay around generally but I've

Exiting fullscreen activity sometimes leaves artifacts in action bar and system navigation areas

 ̄綄美尐妖づ 提交于 2019-12-25 02:56:03
问题 I have a normal Activity (A) with visible Action Bar which launches another fullscreen activity (B) to display photos. When (B) finishes and activity (A) is displayed back sometimes I can see the following picture: Please note visual distortion of action bar and navigation areas. The above artifacts disappear only when I start interacting with the activity, scrolling it, etc. Full screen activity code: protected void onCreate(Bundle savedInstanceState) { supportRequestWindowFeature(Window

Moving JScrollPane horizontally results in blured text

[亡魂溺海] 提交于 2019-12-22 08:25:20
问题 I have a TextArea inside JScrollPane inside standard JPanel. JPanel panelMain = new JPanel(); panelMain.setBorder(titledBorder1); panelMain.setBounds(new Rectangle(2, 5, 970, 700)); panelMain.setLayout(null); JTextArea fieldBody = new JTextArea(); JScrollPane fieldBodyScrollPane = new JScrollPane(fieldBody); fieldBodyScrollPane.setBounds(70, 140, 790, 500); panelMain.add(fieldBodyScrollPane); When I type enough text in a single row the horizontal knob appears - so far good. But when I start

How can I get rid of these 'spike' visual artifacts when drawing with WPF?

北战南征 提交于 2019-12-13 13:19:06
问题 I'm current drawing some tile (small square images) for a mapping app. I'm using WPF to draw shapes on to these tiles. I have a list of geospatial coordinates that make up polygons that are drawn. The geospatial coordinates that make up these polygons are converted in to pixel coordinates. The tiles are created at various set levels of detail. At most of these levels of detail the drawing is fine; but at certain levels a visual artifact appears in the form of a spike or a line. Here's an

QML: Garbled text with colorful pixels around it on Intel GPU

笑着哭i 提交于 2019-12-11 08:17:03
问题 Screenshot of one of the Qt Creator example apps: My videocard is a Mobile Intel(R) 4 Series Express Chipset Family . Any idea what the problem might be? 回答1: The solution was to call either: QGuiApplication::setAttribute(Qt::AA_UseOpenGLES); or QGuiApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); before instantiating QGuiApplication . I don't know exactly why it worked :) 来源: https://stackoverflow.com/questions/39081028/qml-garbled-text-with-colorful-pixels-around-it-on-intel-gpu

How to avoid visual artifacts when hosting WPF user controls within a WinForms MDI app?

人盡茶涼 提交于 2019-11-30 05:25:31
When hosting WPF user controls within a WinForms MDI app there is a drawing issue when you have multiple forms that overlap each other that causes very distinct visual artifacts. These artifacts are mostly visible after dragging one child form over another one that also hosts WPF content or by allowing the edges of the child form to be clipped by the main MDI parent when dragging it around. After the drag and drop of the child form is completed the artifacts stay around generally but I've found that setting focus to a different application's window and then refocusing back on to my application