Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Color is getting Overridden

More
IP: 123.252.210.122 6 years 9 months ago #14372 by apdeveloper
//rectangle color is blue
plugin.setColor(Int32(bitPattern:0xFF0000FF), forFeature: 1)
//Underline color is yellow
plugin.setColor(Int32(bitPattern:0xFFFFFF00), forFeature: 2)

I have set different color for rectangle and line but still if i draw rectangle and then if i draw line over rectangle then the color of line is blue not yellow.
More
IP: 212.97.62.176 6 years 9 months ago #14374 by federico
Dear apdeveloper,
Could you please post a more complete part of your code?
Which RadaeeSDK's version are you using?
More
IP: 212.97.62.176 6 years 9 months ago #14376 by emanuele
Dear user,

which Swift version are you using? We already fixed this issue in recent versions.
We checked with the latest version ( 1.1.1 ) and it works correctly.
More
IP: 114.143.88.94 6 years 9 months ago #14386 by apdeveloper
Dear team,

Thank you for your reply ,
But the error still exits in the latest swift version which 1.1.1
can you please help me out.
More
IP: 212.97.62.176 6 years 9 months ago #14388 by emanuele
Dear user,

we checked again, and we noticed that your code is setting the underline color value, not the line color (arrow annotation).
Code:
//rectangle color is blue plugin.setColor(Int32(bitPattern:0xFF0000FF), forFeature: 1) //Underline color is yellow plugin.setColor(Int32(bitPattern:0xFFFFFF00), forFeature: 2)
In this case everything works as expected, but we noticed that arrow annotation color is using the rect annotation color.
You could easily fix in PDFView.m class, replacing
Code:
[page addAnnotLine:pt_cur :&pt_cur[1] :GLOBAL.g_rect_Width :0 :1 :GLOBAL.g_rect_color :GLOBAL.g_rect_color];
with
Code:
[page addAnnotLine:pt_cur :&pt_cur[1] :GLOBAL.g_rect_Width :0 :1 :GLOBAL.g_line_color :GLOBAL.g_line_color];
The feature value for line annotation color is missing in setColor method, but we introduce a new method to set global vars (and then color) in recent versions:
- add #import "include/PDFView/RDGlobal.h" in RadaeeSwift-Bridging-Header.h
- set the global var in this way after the plugin.show method:
Code:
//Create Reader instance from custom path let reader = plugin.show(path, withPassword: "") let global: RDGlobal = plugin.getGlobal() as! RDGlobal global.g_ink_color = 0xFFFF0000; // free hand drawing (red) global.g_rect_color = 0xFF0000FF; // rect (blue) global.g_line_color = 0xFFFFFF00; // arrow (yellow) global.g_oval_color = 0xFF00FF00; // oval (green)
You could find the complete global vars in RDGlobal.h

We will fix the ink color in next version, thank you for your report.
Time to create page: 0.432 seconds
Powered by Kunena Forum