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 [ | |
references: http://user.it.uu.se/~andersa/gedcom/ch1.html#grammar | |
sample-files: [ | |
http://heiner-eichmann.de/gedcom/gedcom.htm | |
http://heiner-eichmann.de/gedcom/allged.ged | |
] | |
] | |
gedcom_main: [some gedcom_line] | |
gedcom_line: [ |
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 [] | |
do %rmake.r | |
change-dir %./test-files/ | |
spec-1: [ | |
target %xxx.bld | |
depends on [%xxx-0.txt %xxx-1.txt] |
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 [ | |
Purpose: "Show how to drop (real) faces to make a GUI." | |
] | |
btn-pos: 700x10 | |
n: 0 | |
view [ | |
size 800x600 |
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 [ | |
Purpose: "Show how to drop faces to make a GUI and save it." | |
] | |
spec: copy [] | |
btn-pos: 700x10 | |
n: 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 [] | |
view [ | |
base 200x336 white draw [ | |
pen #eeac29 | |
fill-pen #eeac29 polygon 100x2 100x65 72x49 | |
fill-pen #bc822d polygon 100x2 100x65 128x49 | |
pen #d41c18 | |
fill-pen #d41c18 polygon 100x84 100x146 37x109 64x63 |
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 [] | |
collect-values: func [ | |
"Collect values in a block, by datatype or custom parse rule" | |
block [block!] | |
rule "Datatype, prototype value, or parse rule" | |
/deep "Include nested blocks" | |
][ | |
rule: switch/default type?/word rule [ | |
datatype! block! typeset! [rule] ; Blocks and typesets (e.g. any-word!) work directly as rules. |
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 [] | |
#include %include-me.red | |
print incl-int | |
print mold incl-str | |
img: load/as incl-img 'png | |
view [image img] |
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: "Red set-related functions" | |
Author: "Gregg Irwin" | |
File: %sets.red | |
Tabs: 4 | |
Rights: "Copyright (C) 2013 All Mankind. All rights reserved." | |
License: { | |
Distributed under the Boost Software License, Version 1.0. | |
See https://github.com/dockimbel/Red/blob/master/BSL-License.txt | |
} |
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
; The original is at https://gist.github.com/toomasv/19e45ce2cbd7dc213548400fcdec1f8b | |
context [ | |
colors: exclude sort extract load help-string tuple! 2 [glass] | |
lay: copy [ | |
style color: base 70x70 font [size: 8] wrap top on-down [ | |
write-clipboard form face/extra | |
tx/data: rejoin [ | |
"Color '" face/extra "' (" get face/extra ") copied to clipboard!" | |
] |
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 [] | |
linear-interpolate: func [ | |
src-min [number!] | |
src-max [number!] | |
dest-min [number!] | |
dest-max [number!] | |
value [number!] | |
][ | |
add dest-min ((value - src-min) / (src-max - src-min) * (dest-max - dest-min)) |