Bug #900 - clutter_actor_lower() and friends do not queue redraw
* clutter/clutter-actor.c:
(clutter_actor_raise),
(clutter_actor_lower): Queue a redraw after raising and lowering
and actor in the paint order stack. (#900)
actor position was being moved in the wrong direction. Perhaps
this was a cut-and-paste bug from move_anchor_point_from_gravity
because in that function ax and ay represent the old anchor
position, but in this function they represent the new.
primitives and path API a bit smaller and more resembling cairo.
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl.c:
* clutter/clutter-actor.c:
* clutter/clutter-rectangle.c:
* tests/test-cogl-offscreen.c:
* tests/test-cogl-primitives.c:
* tests/test-cogl-tex-convert.c:
* tests/test-cogl-tex-foreign.c:
* tests/test-cogl-tex-getset.c:
* tests/test-cogl-tex-tile.c: updated according to changes in cogl.
* clutter/clutter-actor.c:
(parse_rotation_array),
(clutter_actor_set_custom_property): Use the internal, unit based
rotation setter when parsing the rotation from a ClutterScript
file.
(clutter_geometry_copy),
(clutter_vertex_copy),
(clutter_actor_box_copy): Use the more efficient g_slice_dup().
(clutter_actor_get_stage): Add documentation.
* clutter/clutter-group.c: Documentation fix.
* clutter/clutter-actor.c: Document :show-on-set-parent and
the fact that calling clutter_actor_show() and hide() on an
unparented actor will change that property as well as a side
effect.
Bug 892 - Incorrect results using rotation-[center|angle] properties
* clutter/clutter-actor.c:
(clutter_actor_set_rotation_internal): Inline function for setting
the rotation using fixed point for the angle and units for the
center of rotation.
(clutter_actor_set_property),
(clutter_actor_set_rotationx): Use the internal setter to avoid
loss of precision and too many conversions to and from units.
Bug #864 - Allow instantiating and subclassing of ClutterStage
* clutter/Makefile.am: Add clutter-stage-window.[ch]
* clutter/clutter-stage-manager.c:
(_clutter_stage_manager_remove_stage): Do not warn if removing
a stage we don't manage, as we might be invoked multiple times
during a ClutterState dispose sequence.
* clutter/clutter-actor.c:
* clutter/clutter-backend.[ch]:
* clutter/clutter-main.c:
* clutter/clutter-private.h:
* clutter/clutter-stage.[ch]: Make ClutterStage a proxy actor,
with a private actor implementing the ClutterStageWindow
interface for handling the per-backend realization, painting
and unrealization, plus all the windowing system abstraction.
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-stage-x11.[ch]: Port the X11 backend
to the new backend and stage API and semantics.
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-stage-glx.c: Port the GLX backend to
the new backend and stage API and semantics.
* clutter/eglx/clutter-backend-egl.[ch]:
* clutter/eglx/clutter-stage-egl.[ch]: Port the EGLX backend
to the new backend and stage API and semantics (untested).
* tests/test-multistage.c (on_button_press): Rename
clutter_stage_create_new() to clutter_stage_new().
* clutter/clutter-actor.c:
Remove uneeded stage private member.
Add show-on-set-parent prop and make so by default Actors are
now automatically shown when reparented (#791)
* clutter/eglx/clutter-backend-egl.c:
* clutter/cogl/gles/cogl.c:
A couple of minor comments.
* clutter/eglnative/Makefile.am:
Add missing clutter-egl.h header (back port from trunk)
* tests/test-actors.c:
Modify to take advantage of new show-on-set-parent functionality.
contained data structure.
* clutter/clutter-id-pool.[ch]: new files.
* clutter/Makefile.am: added clutter-id-pool.[ch]
* clutter/clutter-private.h: use a ClutterIDPool instead of GArray and
GSList to keep track of the reusable ids.
* clutter/clutter-actor.c: moved id pool logic away.
* clutter/clutter-main.c: simplified id pool creation/finalization.
Add support for the anchor point inside ClutterScript (#834,
David Stanczak)
* clutter/clutter-actor.c:
(clutter_actor_set_property),
(clutter_actor_get_property),
(clutter_actor_class_init): Add the :anchor-x and :anchor-y
properties to the ClutterActor class.
(clutter_actor_set_anchor_point),
(clutter_actor_set_anchor_pointu),
(clutter_actor_set_anchor_point_from_gravity): Reimplement
the pixel based and gravity based API using the units based
one. Emit the ::notify signal for the :anchor-x and :anchor-y
properties.
(parse_units),
(clutter_actor_parse_custom_node): Parse the :anchor-x and
:anchor-y properties using the custom units format (mm, px,
pt and %).
* tests/test-script.json: Test the newly added properties.
of overflowing the id numbers when continusly creating and destroying
actors on long running applications for 16bpp.
* clutter/clutter-private.h: replaced hashtable with GArray and a
GSList for available slots in the array.
* clutter/clutter-actor.c: (create_actor_id): function to create an
actor->id mapping, (release_actor_id): function to mark an existing id
as available for reuse.
* clutter/clutter-main.c: (clutter_context_free): added utility
function for cleaning up the context,
(clutter_get_actor_by_gid): use the GArray for looking up actors.
* clutter/clutter-actor.c: Remove the usage of g_return_if_fail()
from static functions: either assert or use g_warning() to check
internal state, as g_return_if_fail() can be compiled out.
* clutter/clutter-main.c: Ditto as above.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_get_abs_opacity): Add function that does what
get_opacity() does now...
(clutter_actor_get_opacity): ... and make get_opacity() do what
it's supposed to be doing. The original get_opacity() returned
a composited value, and there's no way to actually extract the
real opacity value set with set_opacity().
* clutter/clutter-clone-texture.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-texture.c: Update to use get_abs_opacity().
* clutter/clutter-entry.c:
* clutter/clutter-label.c: Ditto. Also, never change the stored
alpha value. (#804)
* tests/Makefile.am:
* tests/test-opacity.c: Test suite for the get_opacity() and
get_abs_opacity() API, and correct opacity handling.
* README: Add note about the change in get_opacity().
* clutter/clutter-actor.[ch]:
* clutter/clutter-types.h:
* doc/reference/clutter-docs.sgml: Fix a lot of documentation.
2008-02-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
(clutter_group_query_coords):
Added function to translate vertex array to a bounding box.
(clutter_actor_is_scaled):
(clutter_actor_is_rotated):
Fixed documentation.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
(clutter_actor_is_scaled):
(clutter_actor_is_rotated):
Convenience functions to test whether actor is scaled or rotated.
(clutter_actor_apply_relative_transform_to_point):
Removed unused variable.
* clutter/clutter-group.c:
(clutter_group_query_coords):
Use clutter_actor_get_relative_vertices() to calculate bounding
boxes of children that are scaled or rotated.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
(clutter_actor_get_relative_vertices):
(clutter_actor_apply_relative_transform_to_point):
Functions to calculate actor vertices in the plane of a given
ancestor.
* clutter/clutter-actor.c:
Minor documentation tweak to class description.
* clutter/clutter-behaviour-scale.c:
'Force' start + end vals of scale behaviour
(#779, Havoc Pennington)
* clutter/clutter-actor.c (clutter_actor_transform_stage_point):
Moved part of the calculation to floating point to avoid overflow
of ClutterFixed range for large actors (bug 613).
* clutter/clutter-actor.c:
(clutter_actor_set_property):
Fixed handling of PROP_ROTATE_CENTER_Y, ROTATE_CENTER_Z
* tests/test-actors.c:
Adjusted to use anchor point for both group and hands.
(_clutter_actor_apply_modelview_transform): perform translation as
well as anchor point adjustment based on self not being stage (and
not by self not being an orphan).
* clutter/clutter-actor.c: (clutter_actor_get_vertices):
Make sure GL related Matrices are initialised. Fixes#756
* clutter/clutter-texture.c:
Fix up code from Norways answer to Jean-Michel Basquiat.
(warning on tile_get_pixbuf)
renamed clutter_actor_apply_shader to be clutter_actor_set_shader.
Reindented/aligned header.
* clutter/clutter-texture.c: (clutter_texture_paint): temporarily
disable the shader on top of the clutter context's shader stack while
rendering into the FBO.
* tests/test-fbo.c: (main): s/apply_shader/set_shader/
* tests/test-shader.c: (button_release_cb), (main):
s/apply_shader/set_shader/
* clutter/clutter-actor.c:
(clutter_actor_get_property): Use clutter_actor_get_reactive()
instead of the IS_REACTIVE() macro.
(clutter_actor_set_reactive): Emit the notify signal for the
reactive property.
* clutter/clutter-timeline.c:
(timeline_timeout_func),
(clutter_timeline_get_delta): Coding style fixes.
* clutter/clutter-actor.c:
(clutter_actor_transform_vertices):
Call clutter_actor_query_coords() instead of accessing the actor
box, so that actors that calculate their bounding box on the fly
(like ClutterGroup) work.
* (_clutter_actor_apply_modelview_transform_recursive):
Made to work for parentless actors.
* clutter/clutter-actor.c (clutter_actor_init): Explicitly
memset() to 0 the clip container, so if you get the clip without
having set it, you won't get garbage.
2008-01-31 Rob Bradford <rob@openedhand.com>
* clutter.symbols: Add clutter_actor_move_byu()
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_move_by),
(clutter_actor_move_byu): Add a units-based variant of the
clutter_actor_move_by() function
reviewed by: <delete if not using a buddy>
* clutter/clutter-actor.c:
(parse_rotation_array): Inline, and get the JsonArray as a parameter
(parse_rotation): Update
* clutter/clutter-script.c:
(warn_missing_attribute): Fix for emacs-style warnings
(clutter_script_parse_node): Remove an ifdeffed out section
(clutter_script_construct_parameters),
(clutter_script_construct_object): Rename get_parameters, so
it's obvious what it does
* clutter.symbols: Add clutter_actor_set_clipu() and
clutter_actor_get_clipu()
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_set_clipu), (clutter_actor_get_clipu): Add the
new units-based versions of the clip accessors
(clutter_actor_set_clip), (clutter_actor_get_clip): Reimplement
the pixels-based clip accessors as proxies for the units-based
ones
* clutter/cogl/cogl.h: Update cogl_clip_set() to accept the
clip components as ClutterFixed values
* clutter/cogl/gl/cogl.c (cogl_clip_set): Update the GL implementation
of cogl_clip_set()
* clutter/cogl/gles/cogl.c:
(cogl_rectangle_internal): Provide an internal, inlined rectangle
drawing function using fixed point values, to be shared by
cogl_clip_set() and cogl_rectangle()
(cogl_clip_set), (cogl_rectangle): Update the GLES implementation
of cogl_clip_set() and cogl_rectangle() to use the new internal
rectangle drawing function
* clutter/clutter-actor.c: Make the clip an array of ClutterUnit
values instead of pixel-based; this allows higher precision and
device independence
(_clutter_actor_apply_modelview_transform): Pass the clip
components converting from units to fixed point values, using
the new cogl_clip_set() signature
(clutter_actor_get_property), (clutter_actor_set_clip),
(clutter_actor_get_clip): Update the accessors of the clip
property
* clutter/clutter-actor.c:
(clutter_actor_should_pick_paint),
(clutter_actor_apply_transform_to_point): Fix the whitespace.
(clutter_actor_set_rotation): Clarify that the coordinates of
the centre of rotation are relative to the anchor point or,
if not set, to the upper left corner of the bounding box.