Git Product home page Git Product logo

Comments (6)

MarcinZiabek avatar MarcinZiabek commented on September 25, 2024 1

It seems that patterns are rasterized by the Skia SVG engine.

I can offer the following workaround that generates each stripe in a loop:

.Svg(size =>
{
    var tileSize = 15;
    
    var stripes = Enumerable
        .Range(0, (int)(size.Width / tileSize / 2) + 1)
        .Select(x => $@"<rect x=""0"" y=""{tileSize * x * 2}"" width=""100%"" height=""{tileSize}"" fill=""black""></rect>");
    
    return $@"<svg width=""100%"" height=""100%"" style=""background:black;"">
        <defs>
            <clipPath id=""clip"">
              <rect x=""0"" y=""0"" width=""100%"" height=""100%"" />
            </clipPath>
          </defs>
        <g clip-path=""url(#clip)"">
            <rect x=""0"" y=""0"" width=""100%"" height=""100%"" fill=""yellow""></rect>

          <g  transform=""rotate(-45) translate(-40, 0)"">
            {string.Join("", stripes)}
          </g></g>
        </svg>";
});

from questpdf.

burkaysucu avatar burkaysucu commented on September 25, 2024

@MarcinZiabek I don't remember how many problems of ours you solved. You always come up with a solution and we always talk (highly) behind you, thank you so much! :)

from questpdf.

MarcinZiabek avatar MarcinZiabek commented on September 25, 2024

It's my pleasure to help! Thanks to the hybrid license, I can dedicate time to provide at least basic support 😄

from questpdf.

burkaysucu avatar burkaysucu commented on September 25, 2024

@MarcinZiabek Hi Marcin. We have been strongly considering that. We will get in touch with you soon.

from questpdf.

MarcinZiabek avatar MarcinZiabek commented on September 25, 2024

Just to clarify, I didn't mean to suggest you should purchase the license. Instead, I am simply grateful that the Community understands and respects the license and that there is funding to keep going :)

from questpdf.

burkaysucu avatar burkaysucu commented on September 25, 2024

@MarcinZiabek we just want to join the club :)

from questpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.