X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fnode-attachments%2Fscene-graph-text-attachment.h;h=4aad070f969551d6a8f6f1277829226b52461ebe;hb=60ed9bc9563197af53546603254dd45e02db36a4;hp=365f29692bd0decebb0180f4e0c35cf4c39e97b1;hpb=f89fd48d685d7560b7bbeb528a56e59792c48871;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/node-attachments/scene-graph-text-attachment.h b/dali/internal/update/node-attachments/scene-graph-text-attachment.h index 365f296..4aad070 100644 --- a/dali/internal/update/node-attachments/scene-graph-text-attachment.h +++ b/dali/internal/update/node-attachments/scene-graph-text-attachment.h @@ -75,6 +75,13 @@ public: void SetTextVertexBuffer( BufferIndex updateBufferIndex, TextVertexBuffer* vertexBuffer ); /** + * Set the pixel size of the font, this is passed to the renderer + * @param updateBufferIndex The current update buffer index. + * @param pixelSize The new pixel size + */ + void SetTextFontSize( BufferIndex updateBufferIndex, float pixelSize ); + + /** * Set the color associated with the gradient end point. * @param[in] updateBufferIndex The current update buffer index. * @param[in] color The gradient color (end-point color) @@ -216,6 +223,17 @@ inline void SetTextVertexBufferMessage( EventToUpdate& eventToUpdate, const Text new (slot) LocalType( &attachment, &TextAttachment::SetTextVertexBuffer, &buffer ); } +inline void SetTextFontSizeMessage( EventToUpdate& eventToUpdate, const TextAttachment& attachment, float pixelSize ) +{ + typedef MessageDoubleBuffered1< TextAttachment, float > LocalType; + + // Reserve some memory inside the message queue + unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) ); + + // Construct message in the message queue memory; note that delete should not be called on the return value + new (slot) LocalType( &attachment, &TextAttachment::SetTextFontSize, pixelSize ); +} + inline void SetGradientColorMessage( EventToUpdate& eventToUpdate, const TextAttachment& attachment, const Vector4& color ) { typedef MessageDoubleBuffered1< TextAttachment, Vector4 > LocalType;