tikz: removing borders in fill white

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












This is what I got with the following code
enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4);
fill[white] (90:4) -- (190:2.6) -- (-10:2.6) ;

endtikzpicture

enddocument


I wonder how to remove borders in fill. Thanks



Edited



Using the solution given by @Ulrike Fischer, I get something like this



enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle;

fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ;
fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;


endtikzpicture

enddocument


This appends extra space between two pieces.







share|improve this question


















  • 1




    Have you tried draw=none?
    – TeXnician
    Aug 19 at 8:58










  • Yes, I tried draw = none but without any success. Any thoughts.
    – MYaseen208
    Aug 19 at 9:14















up vote
3
down vote

favorite












This is what I got with the following code
enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4);
fill[white] (90:4) -- (190:2.6) -- (-10:2.6) ;

endtikzpicture

enddocument


I wonder how to remove borders in fill. Thanks



Edited



Using the solution given by @Ulrike Fischer, I get something like this



enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle;

fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ;
fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;


endtikzpicture

enddocument


This appends extra space between two pieces.







share|improve this question


















  • 1




    Have you tried draw=none?
    – TeXnician
    Aug 19 at 8:58










  • Yes, I tried draw = none but without any success. Any thoughts.
    – MYaseen208
    Aug 19 at 9:14













up vote
3
down vote

favorite









up vote
3
down vote

favorite











This is what I got with the following code
enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4);
fill[white] (90:4) -- (190:2.6) -- (-10:2.6) ;

endtikzpicture

enddocument


I wonder how to remove borders in fill. Thanks



Edited



Using the solution given by @Ulrike Fischer, I get something like this



enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle;

fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ;
fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;


endtikzpicture

enddocument


This appends extra space between two pieces.







share|improve this question














This is what I got with the following code
enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4);
fill[white] (90:4) -- (190:2.6) -- (-10:2.6) ;

endtikzpicture

enddocument


I wonder how to remove borders in fill. Thanks



Edited



Using the solution given by @Ulrike Fischer, I get something like this



enter image description here



documentclassstandalone
usepackagetikz

begindocument

begintikzpicture

fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle;

fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ;
fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;


endtikzpicture

enddocument


This appends extra space between two pieces.









share|improve this question













share|improve this question




share|improve this question








edited Aug 19 at 9:33

























asked Aug 19 at 8:29









MYaseen208

2,95694393




2,95694393







  • 1




    Have you tried draw=none?
    – TeXnician
    Aug 19 at 8:58










  • Yes, I tried draw = none but without any success. Any thoughts.
    – MYaseen208
    Aug 19 at 9:14













  • 1




    Have you tried draw=none?
    – TeXnician
    Aug 19 at 8:58










  • Yes, I tried draw = none but without any success. Any thoughts.
    – MYaseen208
    Aug 19 at 9:14








1




1




Have you tried draw=none?
– TeXnician
Aug 19 at 8:58




Have you tried draw=none?
– TeXnician
Aug 19 at 8:58












Yes, I tried draw = none but without any success. Any thoughts.
– MYaseen208
Aug 19 at 9:14





Yes, I tried draw = none but without any success. Any thoughts.
– MYaseen208
Aug 19 at 9:14











2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










In your original code, you don't have borders. The the border effect is generated because the blue triangle is drawn first then the white triangle (which has smaller dimensions) is drawn on top of it, hence a border is generated. You can achieve your desired output by slightly changing your coordinates:



documentclassstandalone
usepackagetikz

begindocument
begintikzpicture
fill[blue!20] (90:4) -- (210:4) -- (-30:4);
fill[white] (90:4.5) -- (190:2.615) -- (-10:2.615) ;
endtikzpicture
enddocument


Output



Now for @Ulrike Fischer answer, though it is good and unique, the same problem occurs. The solution requires to draw 4 distinct shapes (one is overdrawn by two triangles which is giving resulting in that border effect). Try to comment fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle; and change your colors to solid blue, red and black (for better visualization) and you will see a better result, but the problem persists at a lower significance.






share|improve this answer



























    up vote
    4
    down vote













    You can try to draw the smaller triangle explicitly:



    documentclassstandalone
    usepackagetikz

    begindocument

    begintikzpicture

    fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
    fill[white,draw=white,thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle ;

    endtikzpicture

    enddocument


    enter image description here






    share|improve this answer




















    • Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
      – MYaseen208
      Aug 19 at 9:28






    • 1




      Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
      – Ulrike Fischer
      Aug 19 at 9:32










    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446644%2ftikz-removing-borders-in-fill-white%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    In your original code, you don't have borders. The the border effect is generated because the blue triangle is drawn first then the white triangle (which has smaller dimensions) is drawn on top of it, hence a border is generated. You can achieve your desired output by slightly changing your coordinates:



    documentclassstandalone
    usepackagetikz

    begindocument
    begintikzpicture
    fill[blue!20] (90:4) -- (210:4) -- (-30:4);
    fill[white] (90:4.5) -- (190:2.615) -- (-10:2.615) ;
    endtikzpicture
    enddocument


    Output



    Now for @Ulrike Fischer answer, though it is good and unique, the same problem occurs. The solution requires to draw 4 distinct shapes (one is overdrawn by two triangles which is giving resulting in that border effect). Try to comment fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle; and change your colors to solid blue, red and black (for better visualization) and you will see a better result, but the problem persists at a lower significance.






    share|improve this answer
























      up vote
      2
      down vote



      accepted










      In your original code, you don't have borders. The the border effect is generated because the blue triangle is drawn first then the white triangle (which has smaller dimensions) is drawn on top of it, hence a border is generated. You can achieve your desired output by slightly changing your coordinates:



      documentclassstandalone
      usepackagetikz

      begindocument
      begintikzpicture
      fill[blue!20] (90:4) -- (210:4) -- (-30:4);
      fill[white] (90:4.5) -- (190:2.615) -- (-10:2.615) ;
      endtikzpicture
      enddocument


      Output



      Now for @Ulrike Fischer answer, though it is good and unique, the same problem occurs. The solution requires to draw 4 distinct shapes (one is overdrawn by two triangles which is giving resulting in that border effect). Try to comment fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle; and change your colors to solid blue, red and black (for better visualization) and you will see a better result, but the problem persists at a lower significance.






      share|improve this answer






















        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        In your original code, you don't have borders. The the border effect is generated because the blue triangle is drawn first then the white triangle (which has smaller dimensions) is drawn on top of it, hence a border is generated. You can achieve your desired output by slightly changing your coordinates:



        documentclassstandalone
        usepackagetikz

        begindocument
        begintikzpicture
        fill[blue!20] (90:4) -- (210:4) -- (-30:4);
        fill[white] (90:4.5) -- (190:2.615) -- (-10:2.615) ;
        endtikzpicture
        enddocument


        Output



        Now for @Ulrike Fischer answer, though it is good and unique, the same problem occurs. The solution requires to draw 4 distinct shapes (one is overdrawn by two triangles which is giving resulting in that border effect). Try to comment fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle; and change your colors to solid blue, red and black (for better visualization) and you will see a better result, but the problem persists at a lower significance.






        share|improve this answer












        In your original code, you don't have borders. The the border effect is generated because the blue triangle is drawn first then the white triangle (which has smaller dimensions) is drawn on top of it, hence a border is generated. You can achieve your desired output by slightly changing your coordinates:



        documentclassstandalone
        usepackagetikz

        begindocument
        begintikzpicture
        fill[blue!20] (90:4) -- (210:4) -- (-30:4);
        fill[white] (90:4.5) -- (190:2.615) -- (-10:2.615) ;
        endtikzpicture
        enddocument


        Output



        Now for @Ulrike Fischer answer, though it is good and unique, the same problem occurs. The solution requires to draw 4 distinct shapes (one is overdrawn by two triangles which is giving resulting in that border effect). Try to comment fill[white, draw = white, thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle; and change your colors to solid blue, red and black (for better visualization) and you will see a better result, but the problem persists at a lower significance.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 19 at 12:19









        M. Al Jumaily

        3636




        3636




















            up vote
            4
            down vote













            You can try to draw the smaller triangle explicitly:



            documentclassstandalone
            usepackagetikz

            begindocument

            begintikzpicture

            fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
            fill[white,draw=white,thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle ;

            endtikzpicture

            enddocument


            enter image description here






            share|improve this answer




















            • Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
              – MYaseen208
              Aug 19 at 9:28






            • 1




              Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
              – Ulrike Fischer
              Aug 19 at 9:32














            up vote
            4
            down vote













            You can try to draw the smaller triangle explicitly:



            documentclassstandalone
            usepackagetikz

            begindocument

            begintikzpicture

            fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
            fill[white,draw=white,thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle ;

            endtikzpicture

            enddocument


            enter image description here






            share|improve this answer




















            • Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
              – MYaseen208
              Aug 19 at 9:28






            • 1




              Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
              – Ulrike Fischer
              Aug 19 at 9:32












            up vote
            4
            down vote










            up vote
            4
            down vote









            You can try to draw the smaller triangle explicitly:



            documentclassstandalone
            usepackagetikz

            begindocument

            begintikzpicture

            fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
            fill[white,draw=white,thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle ;

            endtikzpicture

            enddocument


            enter image description here






            share|improve this answer












            You can try to draw the smaller triangle explicitly:



            documentclassstandalone
            usepackagetikz

            begindocument

            begintikzpicture

            fill[blue!20] (90:4) -- (210:4) -- (-30:4) -- cycle;
            fill[white,draw=white,thick] (90:4) -- (190:2.6) -- (-10:2.6) --cycle ;

            endtikzpicture

            enddocument


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 19 at 9:18









            Ulrike Fischer

            177k7281649




            177k7281649











            • Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
              – MYaseen208
              Aug 19 at 9:28






            • 1




              Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
              – Ulrike Fischer
              Aug 19 at 9:32
















            • Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
              – MYaseen208
              Aug 19 at 9:28






            • 1




              Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
              – Ulrike Fischer
              Aug 19 at 9:32















            Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
            – MYaseen208
            Aug 19 at 9:28




            Thanks @Ulrike for useful answer. Now if I add fill[green!20] (90:4) -- (190:2.6) -- (-10:2.6) -- cycle ; fill[white, draw = white, thick] (90:4) -- (155:2) -- (25:2) -- cycle;, then I get extra space between two pieces. Any thoughts.
            – MYaseen208
            Aug 19 at 9:28




            1




            1




            Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
            – Ulrike Fischer
            Aug 19 at 9:32




            Then I would start to consider not to do the drawing by superimposing triangles. This pixel artefact are hard to come by.
            – Ulrike Fischer
            Aug 19 at 9:32

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446644%2ftikz-removing-borders-in-fill-white%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            Installing NextGIS Connect into QGIS 3?

            One-line joke