- Posts: 67
- Thank you received: 0
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
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
IP: 123.252.210.122
6 years 9 months ago #14372
by apdeveloper
Color is getting Overridden was created 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.
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.
IP: 212.97.62.176
6 years 9 months ago #14374
by federico
Replied by federico on topic Color is getting Overridden
Dear apdeveloper,
Could you please post a more complete part of your code?
Which RadaeeSDK's version are you using?
Could you please post a more complete part of your code?
Which RadaeeSDK's version are you using?
IP: 212.97.62.176
6 years 9 months ago #14376
by emanuele
Replied by emanuele on topic Color is getting Overridden
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.
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.
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 67
- Thank you received: 0
IP: 114.143.88.94
6 years 9 months ago #14386
by apdeveloper
Replied by apdeveloper on topic Color is getting Overridden
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.
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.
IP: 212.97.62.176
6 years 9 months ago #14388
by emanuele
Replied by emanuele on topic Color is getting Overridden
Dear user,
we checked again, and we noticed that your code is setting the underline color value, not the line color (arrow annotation).
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
with
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:
You could find the complete global vars in RDGlobal.h
We will fix the ink color in next version, thank you for your report.
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)
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];
Code:
[page addAnnotLine:pt_cur :&pt_cur[1] :GLOBAL.g_rect_Width :0 :1 :GLOBAL.g_line_color :GLOBAL.g_line_color];
- 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)
We will fix the ink color in next version, thank you for your report.
Time to create page: 0.432 seconds