Coder Social home page Coder Social logo

Comments (5)

ivankokan avatar ivankokan commented on July 19, 2024

Hi! Here is the example for which I pointed some rendering (or general) issues:

unitsize(5mm, 0);
dotfactor = 10;

pen pens[] = {invisible, nullpen, black, red, green + opacity(0.7)};
filltype filltypes[] = {
  Fill, Fill(pink),
  FillDraw, FillDraw(pink), FillDraw(pink, yellow),
  Draw, Draw(yellow),
  NoFill,
  UnFill
};

for (int i = 0; i < pens.length; ++i) {
  label(format("%i", i), (-2, i), E, black);
  currentpen = pens[i];
  for (int j = 0; j < filltypes.length; ++j)
    dot((j, i), filltypes[j]);
}

shipout(bbox(0, FillDraw(blue, blue)));

test_dots.pdf

image

from asymptote.

ivankokan avatar ivankokan commented on July 19, 2024

Very thin lines visible in cases when both currentpen and filltype's drawpen are valid were just a rendering issue. (One can get rid of such disabling "Smooth line art" option in Adobe Reader.)

I continue with the following code and the corresponding output:

unitsize(5mm, 0);
dotfactor = 10;

pen pens[] = {invisible, white + linewidth(0), black, red, green + opacity(0.7)};
filltype filltypes[] = {
  Fill, Fill(pink),
  FillDraw, FillDraw(pink), FillDraw(pink, yellow),
  Draw, Draw(yellow),
  NoFill,
  UnFill
};

for (int i = 0; i < pens.length; ++i) {
  label(format("%i", i), (-2, i), E, black);
  currentpen = pens[i];
  for (int j = 0; j < filltypes.length; ++j)
    dot((j, i), filltypes[j]);
}

shipout(bbox(0, FillDraw(blue, blue)));

test_dots.pdf

test_dots

from asymptote.

ivankokan avatar ivankokan commented on July 19, 2024

Pull request #55. Still WIP.

from asymptote.

ivankokan avatar ivankokan commented on July 19, 2024

Hi, considering the mix of up-to three possible pens, I abandoned my old doubts for proper rendering (mentioned in opening comment).

However, the issue of rendering for non-positive radius is still valid, and #55 resolves that one.

Before:
image

After:
image

from asymptote.

ivankokan avatar ivankokan commented on July 19, 2024

Resolved.

from asymptote.

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.