Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CGContextSetShadow and CGContextSetShadowWithColor to CGContext #368

Merged
merged 1 commit into from Apr 13, 2020

Conversation

@brunogouveia
Copy link
Contributor

brunogouveia commented Apr 13, 2020

No description provided.

@@ -705,5 +717,8 @@ extern {

fn CGContextDrawLinearGradient(c: ::sys::CGContextRef, gradient: ::sys::CGGradientRef, startPoint: CGPoint, endPoint: CGPoint, options: CGGradientDrawingOptions);
fn CGContextDrawRadialGradient(c: ::sys::CGContextRef, gradient: ::sys::CGGradientRef, startCenter: CGPoint, startRadius: CGFloat, endCenter:CGPoint, endRadius:CGFloat, options: CGGradientDrawingOptions);

fn CGContextSetShadow(c: ::sys::CGContextRef, offset: CGSize, blur: CGFloat);
fn CGContextSetShadowWithColor(c: ::sys::CGContextRef, offset: CGSize, blur: CGFloat, color: *const c_void);

This comment has been minimized.

This comment has been minimized.

@brunogouveia

brunogouveia Apr 13, 2020

Author Contributor

I think I declared in the same way CGContextSetFillColorWithColor was declared, but we can change the color type to ::sys::CGColorRef and import TCFType trait.

Btw, for future reference, why some types were defined with foreign_type whilst others were defined with declare_TCFType?

This comment has been minimized.

@jdm

jdm Apr 13, 2020

Member

I think we started using foreign_type on an ad-hoc basis at some point, and only in some repositories before merging them into this one? In any case, if it builds, foreign_type is usually preferred now.

@brunogouveia brunogouveia force-pushed the brunogouveia:shadows branch from cef7b9a to 999128f Apr 13, 2020
@jdm
Copy link
Member

jdm commented Apr 13, 2020

@bors-servo r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Apr 13, 2020

📌 Commit 999128f has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Apr 13, 2020

Testing commit 999128f with merge 45692bd...

@bors-servo
Copy link
Contributor

bors-servo commented Apr 13, 2020

☀️ Test successful - checks-travis
Approved by: jdm
Pushing 45692bd to master...

@bors-servo bors-servo merged commit 45692bd into servo:master Apr 13, 2020
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.