← Back to team overview

kicad-developers team mailing list archive

Re: Problem with our Cairo-only strategy

 

>> My solution would be to stick to OpenGL with hardware antialiasing.

To my knowledge none of the Mac graphics cards have an issue with OpenGL, so this is also my plan.

Cheers,
Jeff.


> On 28 Aug 2018, at 22:32, Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx> wrote:
> 
> On 28/08/18 19:55, Seth Hillbrand wrote:
>> OK.  Then, you should be able to scale the cairo context by 0.5 and draw
>> individual pixels instead of 2x2 blocks.
> 
> It doesn't work this way on OSX. If you want smooth graphics, you either
> have to request a full resolution framebuffer (see
> common/gal/hidpi_gl_canvas.cpp) or use Quartz for drawing. Since Cairo
> in Kicad renders to memory and then copies to framebuffer, if the FB's
> resolution is downscaled by 2 by Apple, the output will be blocky.
> 
> My solution would be to stick to OpenGL with hardware antialiasing.
> 
> Tom
> 
> 
>> 
>> -S
>> 
>> Am Di., 28. Aug. 2018 um 10:35 Uhr schrieb Jeff Young <jeff@xxxxxxxxx
>> <mailto:jeff@xxxxxxxxx>>:
>> 
>>    Scratch that last comment; I got myself tied in knots.
>> 
>>    It is Cairo that renders blocky.
>> 
>> 
>>>    On 28 Aug 2018, at 18:29, Jeff Young <jeff@xxxxxxxxx
>>>    <mailto:jeff@xxxxxxxxx>> wrote:
>>> 
>>>    Interesting.  It’s not Cairo.
>>> 
>>>    We currently have EDA_DRAW_PANEL_GAL hard-coded to OpenGL, so it’s
>>>    actually OpenGL that’s rendering blocky….
>>> 
>>> 
>>>>    On 28 Aug 2018, at 18:11, Jeff Young <jeff@xxxxxxxxx
>>>>    <mailto:jeff@xxxxxxxxx>> wrote:
>>>> 
>>>>    Hi Seth,
>>>> 
>>>>    The scaling comes out correct, it’s just blocky.
>>>> 
>>>>    Is there some way to adjust what Cairo thinks the screen
>>>>    resolution is and then re-scale the canvas so that everything
>>>>    comes out the same again?  I don’t know.
>>>> 
>>>>    Cheers,
>>>>    Jeff.
>>>> 
>>>> 
>>>>>    On 28 Aug 2018, at 18:06, Seth Hillbrand <seth@xxxxxxxxxxxxx
>>>>>    <mailto:seth@xxxxxxxxxxxxx>> wrote:
>>>>> 
>>>>>    Can we just use cairo_scale to adjust the axes for Mac retina?
>>>>> 
>>>>>    -S
>>>>> 
>>>>>    Am Di., 28. Aug. 2018 um 09:59 Uhr schrieb Jeff Young
>>>>>    <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>:
>>>>> 
>>>>>        JP made the Footprint Wizard Cairo-only recently, and I
>>>>>        planned to do the same for the Eeschema dialog previews.
>>>>> 
>>>>>        However, I’ve just discovered that Cairo doesn’t handle
>>>>>        Retina displays on Mac.  (It essentially draws blocks of 2x2
>>>>>        pixels instead of individual ones.)
>>>>> 
>>>>>        Anyone know if this is something we can fix, or if we need
>>>>>        to use OpenGL on Mac?
>>>>>        _______________________________________________
>>>>>        Mailing list: https://launchpad.net/~kicad-developers
>>>>>        <https://launchpad.net/%7Ekicad-developers>
>>>>>        Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>        <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>>        Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>        <https://launchpad.net/%7Ekicad-developers>
>>>>>        More help   : https://help.launchpad.net/ListHelp
>>>>> 
>>>> 
>>>>    _______________________________________________
>>>>    Mailing list: https://launchpad.net/~kicad-developers
>>>>    <https://launchpad.net/%7Ekicad-developers>
>>>>    Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>    <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>    Unsubscribe : https://launchpad.net/~kicad-developers
>>>>    <https://launchpad.net/%7Ekicad-developers>
>>>>    More help   : https://help.launchpad.net/ListHelp
>>> 
>> 
>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>> 
> 



Follow ups

References