~ubuntu-branches/ubuntu/vivid/cairo-dock-plug-ins/vivid

« back to all changes in this revision

Viewing changes to dialog-rendering/src/applet-renderer-text.c

Tags: upstream-2.0.9
ImportĀ upstreamĀ versionĀ 2.0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
*/
19
19
 
20
 
/*********************************************************************************
21
 
 
22
 
This file is a part of the cairo-dock program, 
23
 
released under the terms of the GNU General Public License.
24
 
 
25
 
Written by Fabrice Rey (for any bug report, please mail me to fabounet@users.berlios.de)
26
 
 
27
 
*********************************************************************************/
28
20
#include <string.h>
29
21
#include <math.h>
30
22
#include <cairo-dock.h>
51
43
                pText->pTextSurface = cairo_dock_create_surface_from_text (cInitialText,
52
44
                        pSourceContext,
53
45
                        &pText->textDescription,
54
 
                        1.,
55
 
                        &iTextWidth, &iTextHeight, &fTextXOffset, &fTextYOffset);
 
46
                        &iTextWidth, &iTextHeight);
56
47
        }
57
48
        
58
49
        
83
74
        cairo_set_source_surface (pCairoContext,
84
75
                pText->pTextSurface,
85
76
                pDialog->iLeftMargin,
86
 
                (pDialog->bDirectionUp ? 
 
77
                (pDialog->container.bDirectionUp ? 
87
78
                        pDialog->iTopMargin + pDialog->iMessageHeight :
88
 
                        pDialog->iHeight - (pDialog->iTopMargin + pDialog->iBubbleHeight) + pDialog->iMessageHeight));
 
79
                        pDialog->container.iHeight - (pDialog->iTopMargin + pDialog->iBubbleHeight) + pDialog->iMessageHeight));
89
80
        if (fAlpha != 0)
90
81
                cairo_paint_with_alpha (pCairoContext, fAlpha);
91
82
        else
111
102
        pText->pTextSurface = cairo_dock_create_surface_from_text (cNewText,
112
103
                pCairoContext,
113
104
                &pText->textDescription,
114
 
                1.,
115
 
                &iTextWidth, &iTextHeight, &fTextXOffset, &fTextYOffset);
 
105
                &iTextWidth, &iTextHeight);
116
106
        cairo_destroy (pCairoContext);
117
107
        
118
108
        if (iTextWidth > pDialog->iInteractiveWidth || iTextHeight > pDialog->iInteractiveHeight)