Split meta/images/taking-screenshots
from the repository.
This is now in the `racket/taking-screenshots` repository.
This commit is contained in:
parent
93d1fbd0ad
commit
755dc4a852
|
@ -17,4 +17,5 @@
|
|||
("pkg-push" "git://github.com/racket/pkg-push/")
|
||||
("racket-lang-org" "git://github.com/racket/racket-lang-org/")
|
||||
("pkg-index" "git://github.com/racket/pkg-index/")
|
||||
("pkg-build" "git://github.com/racket/pkg-build/"))
|
||||
("pkg-build" "git://github.com/racket/pkg-build/")
|
||||
("taking-screenshots" "git://github.com/racket/taking-screenshots"))
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
Important: before you add a bunch of images or modify a bunch of
|
||||
existing ones to reflect some minor gui change in your theme, consider
|
||||
the fact that binary files changes have a heavy cost in terms of
|
||||
repository size and performance. Please minimize the number of such
|
||||
commits (ie, prefer a single big commit over many smaller ones, avoid
|
||||
committing files that are not "stable").
|
||||
|
||||
* Using GIMP
|
||||
|
||||
To take screen shots of the widgets, you can follow these steps:
|
||||
|
||||
1. Take a widget screen shot
|
||||
|
||||
2. Open it with GIMP
|
||||
|
||||
3. Cut it to 240 x 73
|
||||
|
||||
4. Add a border using Filters/Decor/Add Border...
|
||||
+ Border X size :: 1
|
||||
+ Border Y size :: 1
|
||||
+ Border color :: black
|
||||
+ Delta value on color :: 25
|
||||
|
||||
5. Combine all layers
|
||||
|
||||
6. Add a drop shadow using Filters/Light and Shadow/Drop Shadow...
|
||||
+ Offset X :: 8
|
||||
+ Offset Y :: 8
|
||||
+ Blur radius :: 9
|
||||
+ Color :: black
|
||||
+ Opacity :: 80
|
||||
+ Allow resizing :: #t
|
||||
|
||||
7. Save as .png
|
||||
|
||||
There are two scripts in this directory that might help in this
|
||||
process. Keep in mind though that the GIMP script is very fragile
|
||||
and some tweaking might be necessary to make it work in different
|
||||
setups.
|
||||
|
||||
+ [[file:widget.rkt][widget.rkt]] ::
|
||||
Creates a "canvas" panel with a border, so it is easier to select
|
||||
the widget area using GIMP's Fuzzy Select Tool
|
||||
|
||||
+ [[file:racket-widget.scm][racket-widget.scm]] ::
|
||||
GIMP's script which, when invoked, asks for a window to take a
|
||||
screen shot and do the post production to the image. This script
|
||||
should be put inside a specific directory, here being
|
||||
"~/.gimp-2.6/scripts", and should be invoked at File/Create/Racket
|
||||
Widget.
|
|
@ -1,48 +0,0 @@
|
|||
;;; -*- scheme -*-
|
||||
|
||||
(script-fu-register "script-fu-racket-widget"
|
||||
"Racket Widget"
|
||||
"Take a screen shot of a Racket Widget"
|
||||
"Diogo F. S. Ramos"
|
||||
"copyright 2012-2014, Diogo F. S. Ramos"
|
||||
"August, 2012"
|
||||
"")
|
||||
(script-fu-menu-register "script-fu-racket-widget" "<Image>/File/Create")
|
||||
|
||||
(define (script-fu-racket-widget)
|
||||
(define (crop-to-selection selection image)
|
||||
(let ((x1 (list-ref selection 0))
|
||||
(y1 (list-ref selection 1))
|
||||
(x2 (list-ref selection 2))
|
||||
(y2 (list-ref selection 3)))
|
||||
(gimp-image-crop image
|
||||
(- x2 x1)
|
||||
(- y2 y1)
|
||||
x1 y1)))
|
||||
(let ((image (car (plug-in-screenshot RUN-INTERACTIVE 0 0 0 0 0 0))))
|
||||
(gimp-fuzzy-select (car (gimp-image-get-active-drawable image))
|
||||
(/ (car (gimp-image-width image)) 2)
|
||||
(/ (car (gimp-image-height image)) 2)
|
||||
15.0
|
||||
CHANNEL-OP-REPLACE
|
||||
TRUE
|
||||
FALSE
|
||||
0.0
|
||||
TRUE)
|
||||
(gimp-selection-invert image)
|
||||
(gimp-selection-shrink image 1.0)
|
||||
(crop-to-selection (cdr (gimp-selection-bounds image)) image)
|
||||
(script-fu-addborder image
|
||||
(car (gimp-image-flatten image))
|
||||
1.0
|
||||
1.0
|
||||
'(0 0 0)
|
||||
25)
|
||||
(script-fu-drop-shadow image
|
||||
(car (gimp-image-flatten image))
|
||||
8.0
|
||||
8.0
|
||||
9.0
|
||||
'(0 0 0)
|
||||
80.0
|
||||
1)))
|
|
@ -1,14 +0,0 @@
|
|||
#lang racket/gui
|
||||
|
||||
(provide showcase)
|
||||
|
||||
(define (showcase [name "widget"] #:hmult (hmult 1))
|
||||
(define frame (new frame% [label name]))
|
||||
(define panel (new panel% [parent frame]))
|
||||
(define showcase-panel
|
||||
(new horizontal-panel%
|
||||
[parent panel] [alignment '(center center)]
|
||||
[min-width 242] [min-height (* hmult 75)]
|
||||
[style '(border)] [border 20]))
|
||||
(send frame show #t)
|
||||
showcase-panel)
|
Loading…
Reference in New Issue
Block a user