From 826d3b49a409fc658991a25f2226f67a0a00722e Mon Sep 17 00:00:00 2001 From: Craig Gidney Date: Fri, 7 Jul 2017 00:46:06 -0700 Subject: [PATCH] Update negate gate symbol to be a single thick line --- src/gates/Joke_NeGate.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/gates/Joke_NeGate.js b/src/gates/Joke_NeGate.js index 157c1746..9b9b5334 100644 --- a/src/gates/Joke_NeGate.js +++ b/src/gates/Joke_NeGate.js @@ -1,25 +1,16 @@ import {GateBuilder} from "src/circuit/Gate.js" import {Matrix} from "src/math/Matrix.js" +import {Point} from "src/math/Point.js" import {GatePainting} from "src/draw/GatePainting.js" const NeGate = new GateBuilder(). setSerializedId("NeGate"). - setSymbol("-I"). setTitle("Ne-Gate"). setBlurb("Negates all amplitudes."). setDrawer(args => { GatePainting.paintLocationIndependentFrame(args); let {x, y} = args.rect.center(); - args.painter.print( - "-I", - x, - y, - 'center', - 'middle', - 'black', - '16px monospace', - args.rect.w, - args.rect.h); + args.painter.strokeLine(new Point(x - 6, y), new Point(x + 6, y), 'black', 2); }). setKnownEffectToMatrix(Matrix.square(-1, 0, 0, -1)). gate;