forked from enlightenment/efl
[evas] Fixing oopsies on text/image object docs.
Text needed an explanation and citation to the .c example and large images explaining borders were prettyfied on html docs. SVN revision: 61488
This commit is contained in:
parent
094f06522a
commit
f9737c3187
|
@ -7,6 +7,8 @@
|
|||
*
|
||||
* @ref Example_Evas_Init_Shutdown
|
||||
*
|
||||
* @ref Example_Evas_Text
|
||||
*
|
||||
* @ref Example_Evas_Images
|
||||
*
|
||||
* @ref Example_Evas_Images_2
|
||||
|
@ -725,3 +727,59 @@
|
|||
* @include evas-smart-object.c
|
||||
* @example evas-smart-object.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page Example_Evas_Text Evas text object example
|
||||
*
|
||||
* In this example, we illustrate how to use text objects in various
|
||||
* manners.
|
||||
*
|
||||
* We place, in the canvas, a text object along with a border image to
|
||||
* delimit its geometry. After we instantiate the text object, we set
|
||||
* lots of properties on it to the initial ones from a preset list,
|
||||
* which has the following declaration:
|
||||
* @dontinclude evas-text.c
|
||||
* @skip init values
|
||||
* @until };
|
||||
*
|
||||
* Then, we set the text string itself, on it, with
|
||||
* evas_object_text_text_set(). We set an explicit size of 30 points
|
||||
* for our font, as you could see, what we check back with the the
|
||||
* getter evas_object_text_font_get().
|
||||
*
|
||||
* Look at how it translates to code:
|
||||
* @dontinclude evas-text.c
|
||||
* @skip evas_object_text_add
|
||||
* @until fprintf
|
||||
*
|
||||
* Like in other Evas examples, one interacts with it by means of key
|
||||
* commands:
|
||||
* @dontinclude evas-text.c
|
||||
* @skip static const char *commands
|
||||
* @until ;
|
||||
*
|
||||
* Use the 't' key to exercise the evas_object_text_style_set()
|
||||
* function on the text -- it will cycle through all styles on
|
||||
* #Evas_Text_Style_Type (note we start on #EVAS_TEXT_STYLE_PLAIN,
|
||||
* thus with no effects on it) and, with other keys, you'll be able to
|
||||
* set properties applicable to individual styles on the text object.
|
||||
*
|
||||
* The 'z' key will change the text's @b size, keeping the font family
|
||||
* for it. Use 'f' to change the font, keeping the last size
|
||||
* set. There are three font families the example will cycle through:
|
||||
*
|
||||
* The 'b' command shows us that evas_object_color_set(), on a given
|
||||
* text object, will change the text's @b base color. Experiment with
|
||||
* it, which will cycle through the colors in the <c>.text</c> list in
|
||||
* @c init_data.
|
||||
*
|
||||
* The 's', 'o', 'w' and 'g' keys will make the text object to cycle
|
||||
* to the preset values on colors for shadow, outline, glow and 'glow
|
||||
* 2' effects, respectively. Naturally, they will only take effect on
|
||||
* the text styles which resemble them.
|
||||
*
|
||||
* The full example follows.
|
||||
*
|
||||
* @include evas-text.c
|
||||
* @example evas-text.c
|
||||
*/
|
||||
|
|
|
@ -320,9 +320,7 @@ main(void)
|
|||
};
|
||||
|
||||
d.t_data = init_data;
|
||||
|
||||
d.t_data.font_ptr = d.t_data.font;
|
||||
|
||||
d.t_data.text_ptr = d.t_data.text;
|
||||
d.t_data.glow_ptr = d.t_data.glow;
|
||||
d.t_data.glow2_ptr = d.t_data.glow2;
|
||||
|
@ -384,7 +382,6 @@ main(void)
|
|||
evas_object_show(d.text);
|
||||
|
||||
evas_object_text_font_get(d.text, &font, &size);
|
||||
|
||||
fprintf(stdout, "Adding text object with font %s, size %d\n", font, size);
|
||||
|
||||
/* this is a border around the text object above, here just to
|
||||
|
|
|
@ -5883,13 +5883,19 @@ EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNU
|
|||
* treated specially -- as "borders". This will make those regions be
|
||||
* treated specially on resizing scales, by keeping their aspect. This
|
||||
* makes setting frames around other objects on UIs easy.
|
||||
* See the following figures for a visual explanation:
|
||||
* @image html image-borders.png
|
||||
* See the following figures for a visual explanation:\n
|
||||
* @htmlonly
|
||||
* <img src="image-borders.png" style="max-width: 100%;" />
|
||||
* <a href="image-borders.png">Full-size</a>
|
||||
* @endhtmlonly
|
||||
* @image rtf image-borders.png
|
||||
* @image latex image-borders.eps
|
||||
* @image html border-effect.png
|
||||
* @image latex image-borders.eps width=\textwidth
|
||||
* @htmlonly
|
||||
* <img src="border-effect.png" style="max-width: 100%;" />
|
||||
* <a href="border-effect.png">Full-size</a>
|
||||
* @endhtmlonly
|
||||
* @image rtf border-effect.png
|
||||
* @image latex border-effect.eps
|
||||
* @image latex border-effect.eps width=\textwidth
|
||||
*
|
||||
* @section Evas_Object_Image_Manipulation Manipulating pixels
|
||||
*
|
||||
|
@ -6146,13 +6152,19 @@ EAPI void evas_object_image_file_get (const Ev
|
|||
* @note By default, image objects have no borders set, i. e. @c l, @c
|
||||
* r, @c t and @c b start as @c 0.
|
||||
*
|
||||
* See the following figures for visual explanation:
|
||||
* @image html image-borders.png
|
||||
* See the following figures for visual explanation:\n
|
||||
* @htmlonly
|
||||
* <img src="image-borders.png" style="max-width: 100%;" />
|
||||
* <a href="image-borders.png">Full-size</a>
|
||||
* @endhtmlonly
|
||||
* @image rtf image-borders.png
|
||||
* @image latex image-borders.eps
|
||||
* @image html border-effect.png
|
||||
* @image latex image-borders.eps width=\textwidth
|
||||
* @htmlonly
|
||||
* <img src="border-effect.png" style="max-width: 100%;" />
|
||||
* <a href="border-effect.png">Full-size</a>
|
||||
* @endhtmlonly
|
||||
* @image rtf border-effect.png
|
||||
* @image latex border-effect.eps
|
||||
* @image latex border-effect.eps width=\textwidth
|
||||
*
|
||||
* @see evas_object_image_border_get()
|
||||
* @see evas_object_image_border_center_fill_set()
|
||||
|
@ -6980,6 +6992,8 @@ EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file);
|
|||
*
|
||||
* For multiline and multiple style text, see @ref Evas_Object_Textblock.
|
||||
*
|
||||
* See some @ref Example_Evas_Text "examples" on this group of functions.
|
||||
*
|
||||
* @ingroup Evas_Object_Specific
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue