Extending FillConstraint
I extended the FillConstraint to also center the image in case it's zoomed out.
This here is tha patch for the changes i did. Maybe you find it useful.
This could also be an extended FillConstraint, but i did not see any advantage in moving the constrained image out of the container, so i altered FillConstraint.
This here is tha patch for the changes i did. Maybe you find it useful.
Index: src/org/openzoom/flash/viewport/constraints/FillConstraint.as
===================================================================
--- src/org/openzoom/flash/viewport/constraints/FillConstraint.as (revision 8352)
+++ src/org/openzoom/flash/viewport/constraints/FillConstraint.as (working copy)
@@ -74,11 +74,17 @@
public function validate(transform:IViewportTransform,
target:IViewportTransform):IViewportTransform
{
- if (transform.width > 1)
+ var x:Number = transform.x
+ var y:Number = transform.y
+
+ if (transform.width >= 1) {
transform.width = 1
-
- if (transform.height > 1)
+ x = (1 - transform.width) * 0.5
+ }
+ if (transform.height >= 1) {
transform.height = 1
+ y = (1 - transform.height) * 0.5
+ }
return transform
}
This could also be an extended FillConstraint, but i did not see any advantage in moving the constrained image out of the container, so i altered FillConstraint.
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
The company has this under consideration.
-
Inappropriate?Claudius,
Thanks for the suggestion, I'll see how we can incorporate this into the next release and how we handle the licensing of contributions.
Stay tuned!
–Daniel
I’m happy
-
Inappropriate?I'd be happy to share this under any license that openzoom is currently available with. (If this is of any help for your decision-making).
-
Inappropriate?Claudius,
Thanks for your kind offer. Even though it seems like overkill, I am seriously considering introducing a contributor agreement based on the Sun contributor agreement which sets up a shared copyright:
http://www.sun.com/software/opensourc...
The reason for this is that considering I've once before changed the licensing structure of the OpenZoom SDK, I won't have to find all contributors to agree to any changes while they can preserve their copyright. Although this process has a slight overhead, it only has to be done once for every contributor.
What do you think?
Cheers,
Daniel
-
Inappropriate?I've read the agreement. If i understand it correctly, it grants you the possibility to change the license later, without asking the contributer's permission (since you already have it).
You are only bound to change to another FSF[1] or OSI[2] approved license. So it always stays open-source. In case you'd change it to something I don't like i could still fork the version before that and keep the "old" license.
I've looked over the articles. Now i am not familiar with many of those, but they all seem have the open source and freedom of use in common (a no-brainer, given who certified them ;-) ).
I'm sure this kind of discussion has already taken place in other projects. Maybe there are strong arguments to be found. I'll have a look for that in the next couple of days.
[1]: http://en.wikipedia.org/wiki/List_of_...
[2]: http://en.wikipedia.org/wiki/List_of_...
-
Inappropriate?I have been thinking about this, and would like to sign an adapted* SCA for openzoom. I can't think of reasons that might speak against it.
*) adapted in the sense that the Sun references in the SCA would have to be rewritten for OpenZoom.
-
Claudius,
I'm glad you've decided to sign a contributor's agreement and join the OpenZoom project as a contributor. However, before we proceed there are two things I wanted to disclose:
1.) Before the OpenZoom SDK was available under the current MPL 1.1/GPL 3/LGPL 3 trilicense, there were companies and individuals who wanted to license the product but felt that the GPL 3 was too restrictive. In these cases I have sold commercial licenses to them and plan to do so in the future should such cases occur. However, the current trilicensing scheme is very business friendly and therefore I don't expect many such cases in the future.
2.) There is some news I will share soon which will impact the short-term future of the OpenZoom project and therefore I think we should put your contributor's agreement on hold for a while.
Despite all of the above, I believe a great way to contribute without any formalities, is to simply fork the OpenZoom SDK project on GitHub and add features you're missing or fix bugs that you find.
What are your thoughts?
Yours,
Daniel
Loading Profile...




EMPLOYEE