Download Jar. Libraryless. Click here for Pure Java version (5850L/39K).
1 | !7 |
2 | |
3 | import java.awt.font.*; |
4 | import java.awt.geom.*; |
5 | |
6 | p-awt { |
7 | JPanel panel = singleColorPanel(Color.RED); |
8 | new JWindow w; |
9 | w.add(panel); |
10 | w.setVisible(true); |
11 | |
12 | TextLayout tl = new TextLayout("PERV ALERT", w.getFont().deriveFont(Font.BOLD, 50f), |
13 | ((Graphics2D) w.getGraphics()).getFontRenderContext()); |
14 | Rectangle2D r = tl.getBounds(); |
15 | print("Bounds: " + r); |
16 | new AffineTransform tx; |
17 | tx.translate(0, r.getHeight()); |
18 | Shape outline = tl.getOutline(tx); |
19 | //w.setShape(new Ellipse2D.Double(0,0,500,500)); |
20 | centerWindow(w, iceil(r.getWidth()), iceil(r.getHeight())); |
21 | blinkWindowUsingShape(w, outline); |
22 | } |
Began life as a copy of #1013339
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013346 |
Snippet name: | Blinking Red Text Spike v1 (suboptimal) |
Eternal ID of this version: | #1013346/1 |
Text MD5: | 5fa12e8b9252d5183c92ac2177bbfb90 |
Transpilation MD5: | 73b28458b282607e2db91a46ee620729 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-01-02 23:08:11 |
Source code size: | 640 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 518 / 1182 |
Referenced in: | [show references] |