From a067a975d024c68e2cfd945dd819945c7e37adc9 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 11 Mar 2012 05:18:38 +0000 Subject: [PATCH] Use a 7-argument MessageHook() to get truncationRect:. --- Library.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library.mm b/Library.mm index d45c023..3ba7137 100644 --- a/Library.mm +++ b/Library.mm @@ -703,19 +703,19 @@ MSInstanceMessageHook6(CGSize, NSString, drawAtPoint,forWidth,withFont,lineBreak return CGSizeZero; } -MSInstanceMessageHook6(CGSize, NSString, drawInRect,withFont,lineBreakMode,alignment,lineSpacing,includeEmoji, CGRect, rect, UIFont *, font, int, mode, int, alignment, float, spacing, BOOL, emoji) { +MSInstanceMessageHook7(CGSize, NSString, _drawInRect,withFont,lineBreakMode,alignment,lineSpacing,includeEmoji,truncationRect, CGRect, rect, UIFont *, font, int, mode, int, alignment, float, spacing, BOOL, emoji, CGRect, truncation) { WBStringDrawingState *state(stringDrawingState_); if (state == NULL) - return MSOldCall(rect, font, mode, alignment, spacing, emoji); + return MSOldCall(rect, font, mode, alignment, spacing, emoji, truncation); if (--state->count_ == 0) stringDrawingState_ = state->next_; if (state->info_ == nil) - return MSOldCall(rect, font, mode, alignment, spacing, emoji); + return MSOldCall(rect, font, mode, alignment, spacing, emoji, truncation); NSString *info([Info_ objectForKey:state->info_]); if (info == nil) - return MSOldCall(rect, font, mode, alignment, spacing, emoji); + return MSOldCall(rect, font, mode, alignment, spacing, emoji, truncation); NSString *base(state->base_ ?: @""); NSString *align(@"text-align: center"); -- 2.45.2