Blurry or discontinuous lines in new Windows version lazarus / 39-Graphics ---------------------------------------------------------------------- oraculus · 2014-11-15 17:27 Hello. When I use Windows 8 for my program, canvas like this: Tv.Canvas.line(x + x2, y + y2, x, y);  appear with blurry or discontinuous lines. However in Ubuntu and in my notebook with Windows 7, the canvas shows correctly. Anybody know the cause of this issue?. Thank-you ---------------------------------------------------------------------- Blaazen · 2014-11-15 18:30 Try Code: [Select]Canvas.AntialiasingMode:=amOff; ---------------------------------------------------------------------- oraculus · 2014-11-15 22:04 Many thanks Blaazen, but don't work. I do for example: Code: [Select]Canvas.AntialiasingMode:=amOff; Canvas.EllipseC(X, Y, R, R); If I compile this with my Windows 7 notebook, the image is correct, even in Windows 8, but if I compile this in my PC with Windows 8, the image shows a blurry circle. ---------------------------------------------------------------------- circular · 2014-11-16 01:30 May be related to high DPI. What if you change the options in Windows (appearance, font zoom 100%)? ---------------------------------------------------------------------- oraculus · 2014-11-16 19:48 Thanks, circular, but my display don't support the change that you say, therefore I cannot know if it Works. But the most important question is: if everybody who develop a graphic application made with Lazarus, with Windows 8/8.1 or Windows 10, must change the DPI. ---------------------------------------------------------------------- circular · 2014-11-16 22:59 Maybe if you deactive "DPI awareness" in the project options? ---------------------------------------------------------------------- lainz · 2014-11-17 00:15 In fact he needs to Active DPI awareness option, so the application will not be scaled by the OS. Changing the option maybe doesn't work immediately because Windows make a cache of the manifests. Try renaming the exe, I forget how to refresh manifests with a command line tool... For your answer: if you want to develop High DPI awareness applications you must know how to change the DPI and test under different settings: search dpi in control panel. And.. "I need to make my application High DPI compatible?" The answer is Yes. ---------------------------------------------------------------------- oraculus · 2014-11-17 10:47 Many thanks circular and 007. In Windows 10 I do: Options > Project Options > then selecting the options "Use Manifest to Enable Themes (Windows)" and "Dpi Aware application (for Vista +)" I delete the exe and rebuild the application but the result is the same; circles and lines appear blurry, like discontinous. By the way, with Wine in Linux Mint 17, circles and lines appear also blurry. ---------------------------------------------------------------------- lainz · 2014-11-17 13:22 Report it in the bugtracker. BTW you can upload a screenshot of your desktop? ---------------------------------------------------------------------- oraculus · 2014-11-17 14:18 Of course; the two images. ---------------------------------------------------------------------- circular · 2014-11-18 10:29 It seems the image is stretched to a smaller size when shown. Maybe you are drawing on a TImage that is stretched? ---------------------------------------------------------------------- Never · 2014-11-18 13:52 @oraculus where  are you drawing on ? what is the [ Tv ] ? ---------------------------------------------------------------------- oraculus · 2014-11-18 15:25 Yes, Tv is a TImage. The image size change when I change the size of the window. Therefore the TImage can be stretched, but never mind if the size is little or big, always the TImage appear blurry. The question is: why in Windows 7 (notebook), and in Ubuntu (Linux Mint 17) the canvas are drawn in a correct way, and in Windows 8.1/10 and in Wine, are not? ---------------------------------------------------------------------- lainz · 2014-11-18 17:40 Maybe a bug related only to Windows 8.1/10? Try to draw directly on Form canvas. Code: [Select]procedure TForm1.FormPaint(Sender: TObject); begin   Canvas.Line(0,0,Width,Height); end; ---------------------------------------------------------------------- circular · 2014-11-18 21:19 There may be something with the size of the window. If the TImage is stretched and the client size of the window is not determined properly, this might result in stretching the image. Yes, as 007 points out, try drawing directly on the canvas, if it works, there may be a problem there with TImage. You might try TBGRAVirtualScreen instead and use CanvasBGRA instead. ---------------------------------------------------------------------- taazz · 2014-11-18 23:45 Timage does not have a canvas it self, the canvas property on timage is a courtesy and it internaly links to a bitmap object which has specific size and if drawn once on it the bitmaps dimensions freeze and they are no longer changed as the image is resized this ofcourse means that the bitmap will be stretched in order to fit in the image's visible area. It would be for the best to clear the old bitmap every time the Timage is resized by assigning null to Image's picture property. ---------------------------------------------------------------------- oraculus · 2014-11-19 16:06 I have made the following experiment: I set the TImage Autosize property to True. And now the graphic work well in Windows 10 and in Wine. I don't understand why before Windows 8 all the graphics worked well. Thank-you very much. ---------------------------------------------------------------------- oraculus · 2014-11-19 17:45 The same result occurs when I set the Stretch property of TImage to False. Now I should change all the graphic part of the program. Sometimes it would be better that the operatings systems don't advance.  Thanks to all