Skip to content
This repository has been archived by the owner. It is now read-only.

Support StrokeStyle #49

Merged
merged 1 commit into from Aug 27, 2013
Merged

Support StrokeStyle #49

merged 1 commit into from Aug 27, 2013

Conversation

@sammykim
Copy link
Contributor

sammykim commented Aug 26, 2013

I modified some codes in azure to support StrokeStyle like cap-style, join-style and some others. But there are some problems.
First of them, It doesn't look the join-style works well. I tested it join-style bits beside cap-style in C. It looks 21(cap,join) as hex in C. So as you can see in code, I implemented set method in azure_hl. I think the bit is set properly but the only join_style isn't applied that I want.(I tested CAP_BUTT and CAP_ROUND. Both of them work fine. )
Second, I will send PR about border-style after this is merged. I can render DashedBorderStyle but can't render DottedBorderStyle as I expect. Because I supposed servo and firefox uses same graphic engine. So I refered to firefox code(link : http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSRenderingBorders.cpp#1080) to render them properly specially for DashPattern and cap, join style.
If you can catch what thoes problem are, let me know that I will fix it before it's merged. But I think second one is you might catch after I send main codes for border-style.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 27, 2013

As @sanxiyn commented , I fixed it. I set the bits as same as StrokeOptions initial values in 2D.h
JOIN_MITER_OR_BEVEL is 3_u32. CAP_BUTT is 0_u32. Those are in azure.rs.

@metajack
Copy link
Contributor

metajack commented Aug 27, 2013

Looks good other than the magic number.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 27, 2013

Addressed a comment.
r? @metajack. It it better to sqaush last commit?

@metajack
Copy link
Contributor

metajack commented Aug 27, 2013

Yes, please squash and I'll r+ and merge.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 27, 2013

Thanks, I squashed them.

@metajack

This comment has been minimized.

Copy link

metajack commented on e921722 Aug 27, 2013

r+

metajack added a commit that referenced this pull request Aug 27, 2013
@metajack metajack merged commit fe437b4 into servo:master-upgrade Aug 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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