|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
#import "TextDrawable.h"
|
|
|
#import <CoreText/CoreText.h>
|
|
|
-#import "RAUtils.h"
|
|
|
+#import "TextUtils.h"
|
|
|
|
|
|
@implementation TextDrawable
|
|
|
|
|
|
@@ -97,7 +97,7 @@
|
|
|
{
|
|
|
NSString *content = data[self.drawableTemplate[@"source"]];
|
|
|
NSString *pattern = @"\\$\\.\\{([\\s\\S]*?)\\}\\.\\$";
|
|
|
- NSArray* matches=[RAUtils expression_varable:content regex:pattern];
|
|
|
+ NSArray* matches=[TextUtils expression_varable:content regex:pattern];
|
|
|
// if (matches) {
|
|
|
// for (NSTextCheckingResult *match in matches) {
|
|
|
// for (int i = 0; i < match.numberOfRanges; ++i) {
|
|
|
@@ -421,7 +421,7 @@
|
|
|
NSString* newstring= nil;
|
|
|
// NSString *content = string.string ;
|
|
|
NSString *pattern = @"\\<b\\>([\\s\\S]*?)\\<\\/b\\>";
|
|
|
- // NSArray* matches=[RAUtils expression_varable:content regex:pattern];
|
|
|
+ // NSArray* matches=[TextUtils expression_varable:content regex:pattern];
|
|
|
// if (matches) {
|
|
|
// for (NSTextCheckingResult *match in matches) {
|
|
|
// for (int i = 0; i < match.numberOfRanges; ++i) {
|
|
|
@@ -429,7 +429,7 @@
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
- NSTextCheckingResult * match=[RAUtils expression_findfistMatch:string.string regex:pattern];
|
|
|
+ NSTextCheckingResult * match=[TextUtils expression_findfistMatch:string.string regex:pattern];
|
|
|
|
|
|
while(match)
|
|
|
{
|
|
|
@@ -450,7 +450,7 @@
|
|
|
|
|
|
DebugLog(@"string after replace: %@",string.string);
|
|
|
//newstring=[newstring stringByReplacingOccurrencesOfString:[content substringWithRange:[match rangeAtIndex:i]] withString:[content substringWithRange:[match rangeAtIndex:i+1]]];
|
|
|
- match=[RAUtils expression_findfistMatch:string.string regex:pattern];
|
|
|
+ match=[TextUtils expression_findfistMatch:string.string regex:pattern];
|
|
|
}
|
|
|
}
|
|
|
// if (matches)
|
|
|
@@ -503,7 +503,7 @@
|
|
|
{
|
|
|
NSString *content = data[self.drawableTemplate[@"source"]];
|
|
|
NSString *pattern = @"\\$\\.\\{([\\s\\S]*?)\\}\\.\\$";
|
|
|
- NSArray* matches=[RAUtils expression_varable:content regex:pattern];
|
|
|
+ NSArray* matches=[TextUtils expression_varable:content regex:pattern];
|
|
|
// if (matches) {
|
|
|
// for (NSTextCheckingResult *match in matches) {
|
|
|
// for (int i = 0; i < match.numberOfRanges; ++i) {
|
|
|
@@ -541,10 +541,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
- if([self.text isEqualToString:@"www.newpacificdirect.com"])
|
|
|
- {
|
|
|
- int debug=0;
|
|
|
- }
|
|
|
+// if([self.text isEqualToString:@"www.newpacificdirect.com"])
|
|
|
+// {
|
|
|
+// int debug=0;
|
|
|
+// }
|
|
|
|
|
|
|
|
|
bool bold = [self.drawableTemplate[@"bold"] boolValue];
|
|
|
@@ -687,7 +687,7 @@
|
|
|
CGRect expand_rect=rect;
|
|
|
|
|
|
// CGRect rect=[RAUtils rectAlign:parentrect rect:scalerect hAlign:self.hAlign vAlign:self.vAlign];
|
|
|
- rect=[RAUtils rectVAlign:parentrect rect:rect vAlign:self.vAlign];
|
|
|
+ rect=[TextUtils rectVAlign:parentrect rect:rect vAlign:self.vAlign];
|
|
|
|
|
|
// CGRect pdfrect = [self to_pdf_rect:p_rect pos:self.rect contextHeight:flip_height];
|
|
|
|