octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for a test in Matlab


From: Richard Crozier
Subject: Re: Request for a test in Matlab
Date: Wed, 25 Oct 2017 10:57:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0



On 25/10/17 09:29, Pantxo Diribarne wrote:


2017-10-24 23:51 GMT+02:00 Richard Crozier <address@hidden <mailto:address@hidden>>:

    On 24/10/17 22:44, Pantxo Diribarne wrote:

        Hi,

        Could someone test the following code in ML. We would like to
        see how the text background area behaves when it crosses the
        axes back planes with or without clipping enabled (see
        https://savannah.gnu.org/bugs/?39692
        <https://savannah.gnu.org/bugs/?39692>).

        ---

        clf
        set (gca, 'color', 'b');
        ht = text (.5, .5, 'toto', 'backgroundcolor', 'r', 'margin', 20);
        xlim ([0 3])
        ylim ([0 3])
        surface ();
        view (90, 35);
        drawnow
        c = getframe (gcf);
        imwrite (c.cdata, 'view_90_35.png');
        view (0, 26.8)
        drawnow
        c = getframe (gcf);
        imwrite (c.cdata, 'view_0_26.8.png');
        set (ht, 'clipping', 'on')
        drawnow
        c = getframe (gcf);
        imwrite (c.cdata, 'view_0_26.8_clipping.png');

        ---

        The script should generate 3 png files with figure captures.

        Pantxo


    MATLAB Version: 9.1.0.441655 (R2016b)
    Operating System: Linux 4.4.0-83-generic #106~14.04.1-Ubuntu SMP Mon
    Jun 26 18:10:19 UTC 2017 x86_64
    Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java
    HotSpot(TM) 64-Bit Server VM mixed mode


    Richard

-- The University of Edinburgh is a charitable body, registered in
    Scotland, with registration number SC005336.


Thanks Richard. So it looks like  Matlab disables depth testing for text objects or at least for the background area. In order to confirm this, could you please run the following and post the png here:

----
clf
peaks ();
for p = -3:3
   text (p, p, p, 'toto', 'backgroundcolor', 'r', 'margin', 20);
end
drawnow ()
c = getframe (gcf);
imwrite (c.cdata, 'peaks_and_text.png');
----

Thanks in advance.

Pantxo

here you go

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Attachment: peaks_and_text.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]