This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 2018-07-11 | |
Last-edit: 2018-08-21 | |
File: %arc.red | |
Purpose: "Study of shape-dialect `'arc`" | |
Licence: "MIT" | |
] | |
help: rtd-layout [ | |
{ In } i "shape" /i { dialect drawing of } i "arc" /i b " starts" /b { from the current position. Here I use } i "move" /i { to set initial position.^/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
; outright improvement of collect mezzanine's performance and RAM footprint | |
; the compiled default "collect" | |
collect1: :collect | |
; the interpreted default "collect" | |
collect2: func spec-of :collect body-of :collect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Started: 2018-05-01 | |
Purpose: "First steps into rich-text box" | |
] | |
ctx: context [ | |
env: self | |
start: end: 1 | |
diff: 0 | |
dbl: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 2018-03-12 | |
File: %color-picker.red | |
] | |
clear-reactions | |
make-color: func [i][ | |
sector: i - 1 / 64 + 1 | |
switch sector [ | |
1 [as-rgba 255 0 i - 1 * 4 0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
F: ['line 0x-90 50x0 0x10 -40x0 0x30 30x0 0x10 -30x0 0x40] | |
w1: view/no-wait compose/deep [ | |
title "Reflections" | |
box 300x300 snow draw [ | |
fill-pen white | |
line 0x150 300x150 shape [move 300x150 'line -20x5 0x-10] text 280x155 "x" | |
line 150x0 150x330 shape [move 150x300 'line 5x-20 -10x0] text 125x275 "y" | |
; Original | |
translate 150x150 [matrix [ 1 0 0 1 0 0][fill-pen white shape [move 50x-30 (F)]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [] | |
red-source: %/C/Users/Eigenaar/Projects/Red/sources/ ; adapt this for your situation | |
output-sources: %sources.txt | |
version: read red-source/version.r | |
vdate: modified? red-source/version.r | |
nl: "^/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
title: "Edward de Jong's Chess Challenge" | |
author: ["Gregg Irwin"] | |
] | |
; This may prove useful as more logic is added. Right now it's not a big win. | |
array: function [ | |
"Makes and initializes a block of of values (NONE by default)" | |
size [integer! block!] "Size or block of sizes for each dimension" | |
/initial "Specify an initial value for elements" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 26-11-2017 | |
] | |
range: function [val1 val2 /step stp /limit /enbase ebase /debase dbase /unicode][ | |
stp+?: none | |
stp: any [stp either any [percent? val1 percent? val2] [1%][1]] | |
if any [all [block? stp zero? stp/3] zero? stp] [return none] | |
case [ | |
debase [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
e.g.: :comment | |
delta-time: function [ | |
"Return the time it takes to evaluate a block" | |
code [block! word! function!] "Code to evaluate" | |
/count ct "Eval the code this many times, rather than once" | |
][ | |
ct: any [ct 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 2017-10-24 | |
Needs: View | |
] | |
context [ | |
system/view/auto-sync?: dragable?: off-the-post?: no | |
offset: pos-x: post: current-post: post1: post2: post3: disc: disc1: disc2: disc3: disc4: steps: thickness: none | |
post1-narrow: charset [ 48 - 52] | |
post2-narrow: charset [148 - 152] |