Commit Graph

92 Commits

Author SHA1 Message Date
Eli Barzilay
14d8c8b5a5 Newlines at EOFs. 2012-11-06 14:07:15 -05:00
Danny Yoo
dcf4d8b040 adding close-eval at the end of scribble files that have a toplevel evaluator 2012-11-01 15:32:53 -06:00
Matthew Flatt
d1cd4621de racket/draw: add make-dc' convenience method to bitmap%' 2012-09-14 15:58:47 -06:00
Matthew Flatt
7fd4f59e5a racket/draw: doc overview fix and tweaks 2012-09-14 15:37:11 -06:00
Matthew Flatt
5116f51503 try to clarify gradient docs 2012-08-12 20:17:29 -06:00
Robby Findler
a799985951 fix the gradient example code in the docs.
Things wrong:

 - indentation
 - the dc callback didn't reset the dc state
   (this is okay if you only use the pict
    in the interactions window in drracket,
    because drracket protects itself, but it
    is not okay if you use them in slideshow
    or something)
 - the dc callback didn't use the 'dx' and 'dy'
   arguments properly
   (you could see this going wrong if you put
    two of the picts together in an hc-append
    and looked at the compound pict in the
    interactions window)
2012-08-10 12:15:37 -05:00
Matthew Flatt
f64408fe60 racket/draw: doc clarifications related to `color%'
Commit 18883681a2 reordered the methods. Although the convention in
the `racket/draw' manual is to order methods alphabetically,
alphabetical does look strange for `color%', and I've refined the
non-alphabetical order to one I like even more.
2012-08-04 10:19:55 -06:00
Eli Barzilay
18883681a2 Convert all uses of (integer-in 0 255) to `byte?'. 2012-07-22 13:00:05 -04:00
Matthias Felleisen
30cb1ce4f3 fixed minor typo 2012-07-21 11:07:32 -04:00
Matthew Flatt
00ef7da640 racket/draw: background and text colors in `record-dc%'
Also, improve docs to clarify how the recorded settings interact with
the target DC's settings.
2012-05-27 06:38:30 -06:00
Matthew Flatt
1432912357 racket/draw: fix outline adjustment in `draw-rectangle' and others 2012-05-12 00:55:12 -06:00
Matthew Flatt
68e005fb2c racket/draw: make-immutable-{color,brush,pen} => make-{color,brush,pen}
Also, use keywords for `make-pen' and `make-brush'.

Adding `make-pen' and `make-color' creates many conflicts among
teaching libraries, such as `2htdp/image'. These are easy to fix
up in the tree, but adding such obvious names to `racket/draw'
may create other compatibility problems, so we might have to reconsider
the names.

In consultation with Asumu.
2012-05-01 21:04:40 -06:00
Asumu Takikawa
8db45eb557 Add immutable constructors for color%, brush%, pen%
- Make set-immutable a local method and document
    is-immutable? as a public method
  - Add some racket/draw tests
2012-05-01 21:20:52 -04:00
Matthew Flatt
57f101c74c fix contract in docs
Merge to 5.3
2012-04-15 05:37:44 -06:00
Matthew Flatt
2bdcdbb197 racket/draw, racket/gui: modernize contracts, mostly in documentation
Use `or/c' instead of `one-of/c', `#f' instead of `false/c'.
2012-04-06 18:51:10 -06:00
Matthew Flatt
4f197f4ba9 racket/draw: add get-handle' to bitmap%'; add `make-handle-brush'
The `get-handle' method provides the underlying Cairo surface for
a bitmap, while the unsafe `make-handle-brush' function supports the
use of a Cairo surface as a `brush%'.

Also, add `racket/draw/unsafe/cairo-lib', which simplifies access
Cairo from external libraries. Documenting `racket/draw/unsafe/cairo'
might be better, but that's a lot more work.
2012-03-27 18:14:26 -06:00
Matthew Flatt
b3002cfab0 add hinting configuration to `font%'
The default is that hiniting is enabled, which causes some text
metrics (notably width) to be rounded to integer values, which makes
spacing more consistent. This default is backward-compatible. The
non-default 'unaligned mode refrains from rounding, which makes metric
information scale correctly and improves output for PS/PDF (such as
Redex output).

The `text' function from `slideshow/pict' defaults to
disabling hinting --- which is consistent with its default to combine
text instead of drawing character-by-character -- so slides and Redex
inherit the improvement.
2012-03-27 11:16:27 -06:00
Robby Findler
922857489a add an example to the racket/draw guide 2012-03-06 19:14:30 -06:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Matthew Flatt
40fb54248d add missing docs for transform' method of dc-path%' 2012-02-26 22:13:01 -05:00
Matthew Flatt
645ca02e92 racket/draw: add `record-dc%' 2012-02-25 20:57:56 +00:00
Matthew Flatt
eb032c2fef improvements to the bitmap docs 2012-02-23 07:12:22 -06:00
Robby Findler
1945ff2709 add make-platform-bitmap
also: use it in pict's rendering and
remove redex's platform-specific font choice
(going back to using 'modern on all platforms)

closes PR 12554
2012-02-21 16:19:45 -06:00
Matthew Flatt
530b353798 racket/draw: change font face name interpretation again
Treat a "face" as a font description only if it has a comma,
otherwise go back to treating it as a family name.

This change fixes the problem of parsing "Times New Roman"
as "Times New, Roman".
2012-02-17 11:25:15 -07:00
Matthew Flatt
6c5c170565 racket/draw: add text-outline' to dc-path%' 2011-12-25 18:20:39 -06:00
Matthew Flatt
49802b7ba1 doc correction
Closes PR 12171
2011-11-27 11:14:58 -07:00
Matthew Flatt
567ee96c61 racket/draw: generalize "face" in a font% to be a description
Also add an option to `get-face-list' so that it can actually
return faces, instead of just families.
2011-11-26 08:48:35 -07:00
Matthew Flatt
aab4260127 generalize brush transformation to apply to a stipple 2011-11-24 11:14:54 -07:00
Matthew Flatt
6a99c93ebb add get-colors' to color-database<%>' 2011-11-22 20:17:58 -07:00
Matthew Flatt
a0ba7eb10c doc clarifications 2011-08-24 09:06:28 -06:00
Matthew Flatt
fc5fc02e5e doc `has-alpha-channel?' method 2011-08-22 07:58:04 -06:00
Matthew Flatt
bed64be873 allow larger font sizes --- up to 1024
It's not clear that any limit is still needed, and probably
 font sizes should be liberalized to reals instead of
 integers (but I don't want to spend that kind of time
 right now).
2011-07-15 19:43:47 -06:00
Asumu Takikawa
2fdc56db3a Use real contract in bitmap% docs 2011-07-13 15:35:38 -04:00
Matthew Flatt
007614fc9f add gradient transformation to `brush%' 2011-07-13 10:45:19 -06:00
Matthew Flatt
4905d344dd slideshow/pict: add `rotate'
which requires two new fields in the `child' struct to support
 `lt-find', etc., when child picts are rotated
2011-07-04 16:26:09 -06:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Ryan Culpepper
1b702a2ae3 docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names
2011-07-01 17:16:53 -06:00
Matthew Flatt
e921f20b6a disable (minimize?) smoothing for `draw-bitmap' in 'unsmoothed mode 2011-06-30 12:25:56 -06:00
Eli Barzilay
a38f384a00 Finish converting scheme' -> racket'.
Everything compiles fine now even if the compatibility bindings are
gone.
2011-06-28 00:45:38 -04:00
Eli Barzilay
ac26fe7554 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Matthew Flatt
f34a31cac9 "under <platform>" -> "on <platform>"; "X" -> "Unix"
I originally picked "under" as the preposition to go before
 a platform name, but obviously you should build "on" a
 platform, and "under" suddenly annoys me. The choice of "on"
 is now codified in the documentation style guide. Meanwhile,
 "Unix" insted of "X" seems more clear and consistent in the
 `racket/gui' docs.

 More usefully, this patch also fixes a few out-of-date
 platform-specific claims.
2011-06-17 18:54:43 -06:00
Matthew Flatt
80bd949531 add mode to arc' in dc-path%' to support right/bottom alignment 2011-06-16 08:17:14 -06:00
Matthew Flatt
b6445880e2 add pre-multiplied mode for `{get,set}-argb-pixels' 2011-05-18 16:01:33 -07:00
Matthew Flatt
905eb11651 fix alpha-only mode of `get-argb-pixels'
Closes PR 11927
2011-05-17 16:00:36 -07:00
Matthew Flatt
0011f5957d fix rotation problems and sense of `transform'-like operations
so that they conceptually apply after the current
 transformation, instead of before the current transformation;
 more general rotation problems were related to aligned drawing
 and the calculation of the effective scale for alignment
2011-05-10 09:53:49 -06:00
Asumu Takikawa
14ef89c37d Fix documentation for gui, draw, and framework.
- General cleanup/consistency (e.g. void -> void?)
  - Fix misdocumented methods (found violations via contracts)
2011-04-22 11:27:08 -04:00
Matthew Flatt
52598af1c7 fix doc typo
Closes PR 11840
2011-04-09 17:12:23 -06:00
Robby Findler
d265231452 added some examples for pen cap and join styles 2011-03-30 09:44:54 -05:00
Matthew Flatt
0fda70b7ca fix region% problems
- fail gracefully with pre 1.4 Cairo
 - clip all drawing for an empty clipping region
 - disallow `is-empty?' on a region without a DC
   (since the test depends on the DC dimensions)
2011-03-28 15:15:57 -06:00