When I rotate the gate-not, it doesn't rendered properly #1
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HEL/circuiteria#1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As shown in the image below, the NAND gate is not rendered correctly, and at the same time, other components have similar problems, is there any other way to rotate the components correctly?
Unfortunately, there is currently no easy way to rotate components
It is indeed an important missing feature which I'll look into implementing
I found the input port of the rotated gate could render properly, so I changed the logic of output port by emulating the logic of input port, as shown below (the blue circles are intersections that I use to anchor the output), it works fine with NOT gate and AND gate
But it failed with XOR gate and OR gate, the circle of the inverted output port is inside of those two gates, which is not right. When I dive into the problem, I found a hidden line which is used to locate the "north" and "south" anchors, the hidden line only appears in the
draw-shape
function of OR and XOR, so it disturbs the size of intersections, as shown belowIt seems that the logic of "draw" and "determine the anchors" is not well delineated:
draw_shape
function is not only used for "draw", but also used for determine the "north" and "south" anchor, while thegate
function is used for determine the "east", "west", "output" and other input anchorsdraw_shape
function is specific to each gate, while thegate
function is called by every gateSo I recommended to determine the "east", "west" and "output" anchors within the
draw_shape
function, while leave the implementation of input anchors within thegate
function.