Coder Social home page Coder Social logo

Comments (4)

Mc-Zen avatar Mc-Zen commented on August 31, 2024

Hi @SekoiaTree ,

The reason for it being non-transparent is so that the underlying wires are overdrawn. To illustrate, let's add some wires:
image

Initially, I spent a lot of effort to allow transparent gates and everything but it turned out very tricky with many special cases. It seemed better to not allow transparent gates. For gates, this seems okay to me but I have to admit that I did not think of your case with midstick.

I see two solutions:

  1. We can add a fill parameter to midstick(), so you can pass the same background color to it. To use it now, just add the following code to your file:
#let midstick(content, fill: none, label: none) = gate(content, draw-function: draw-functions.draw-unboxed-gate, label: label, fill: fill)

and use it with midstick(fill: aqua, ...)

  1. The other option is to rewrite a lot of the internals and make transparent gates and co. happen. This is a large effort for not too many benefits but I won't quite say that it will not happen ;)

Thanks for pointing this out!

from quill.

SekoiaTree avatar SekoiaTree commented on August 31, 2024

I don't know hugely much of the internals, but can't you "just" have slice pass its own background color as the default setting for the fill?

Edit: Ah, there's no concept of "on top of", so a gate can't know it's on top of a slice.

from quill.

Mc-Zen avatar Mc-Zen commented on August 31, 2024

Precisely. Just like similar packages in LaTeX, gategroup does not actually "group" the elements that it covers. It is just drawn below.

from quill.

Mc-Zen avatar Mc-Zen commented on August 31, 2024

With 6ebf10, a fill parameter has been added to midstick. With the new release (v0.2.1), this feature is available (package pull request pending).

from quill.

Related Issues (4)

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.