Commit Graph

18 Commits

Author SHA1 Message Date
Luo b952ddd051 update src/display.rs 2016-05-10 13:54:11 +08:00
Anthony Ramine b7c2f5c294 Bump serde to 0.7 2016-03-01 01:54:41 +01:00
Patrick Walton 7f00bbf441 Support serialization of CGFont objects.
Due to API limitations, this will only serialize native fonts, not Web
fonts. Specifically, there is no way I know of to fetch the
`CGDataProvider` associated with a `CGFont`. This isn't a problem for
Servo, however, because Servo knows which fonts are Web fonts and stores
their byte data separately.
2015-11-30 16:41:46 -08:00
bors-servo d21421d6ed Auto merge of #42 - SSheldon:float_typedef, r=metajack
Fix CGFloat type definition for 32-bit

`CGFloat` was always defined as a double, and there was a `TODO` to fix this. I ran into the issue, so here's a PR to fix it :)

The definition for `CGFloat` in CoreGraphics/CGBase.h looks like:
``` c
#if defined(__LP64__) && __LP64__
# define CGFLOAT_TYPE double
#else
# define CGFLOAT_TYPE float
#endif

typedef CGFLOAT_TYPE CGFloat;
```

I also noticed that the definition for `boolean_t` was wrong for arm. The definition in mach/arm/boolean.h is:
``` c
typedef int		boolean_t;
```

And the definition in mach/i386/boolean.h is:
``` c
#if defined(__x86_64__) && !defined(KERNEL)
typedef unsigned int	boolean_t;
#else
typedef int		boolean_t;
#endif
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/42)
<!-- Reviewable:end -->
2015-10-26 11:14:32 -05:00
Patrick Walton d072ab30af Add support for fill colors and font AA.
Also, mark Core Graphics contexts as `Send` and `Sync` since (I believe) they
are thread-safe.
2015-10-16 17:29:42 -07:00
Patrick Walton 87cc3ba551 Add some basic support for bitmap graphics contexts and color spaces 2015-10-13 18:28:55 -07:00
Steven Sheldon a534d23e81 Fix CGFloat type definition for 32-bit. 2015-10-10 12:04:25 -07:00
Jack Moffitt 6937fdfe50 Add metadata for crates.io. 2015-06-03 21:57:27 -06:00
Jack Moffitt 7c41f6db7f Remove cfgs. 2015-06-02 23:42:59 -06:00
Felix Kaaman ef6fc9865b Add some more functions and make geometry structs #[repr(C)] 2015-05-04 10:38:36 +02:00
Robert Gawdzik ☢ 5dec07e798 Update method signatures from an upstream core_foundation change 2015-02-21 03:35:15 -08:00
Jack Moffitt 909b508fc3 Upgrade Rust. 2014-11-05 13:44:48 -07:00
Jack Moffitt 37b261288f Merge pull request #29 from DavidPartouche/quartz_display_services
Added some Quartz Display Services functions (used in glutin)
2014-11-05 12:56:43 -07:00
David Partouche f5e9e0bcb0 Changed mut_null to null_mut 2014-11-04 17:49:17 +01:00
David Partouche 20de0e87e4 Forgot to rename display mod 2014-11-04 17:45:33 +01:00
David Partouche 066201f910 Added some Quartz Display Services functions (used in glutin) 2014-11-04 17:44:07 +01:00
Keegan McAllister 9faeb8fe6d Rust upgrade 2014-09-16 11:38:44 -07:00
Jack Moffitt b02256d3a6 Cargoify rust-core-graphics 2014-08-25 22:37:38 -06:00