Dear user,
we checked again, and we noticed that your code is setting the underline color value, not the line color (arrow annotation).
//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
[page addAnnotLine:pt_cur :&pt_cur[1] :GLOBAL.g_rect_Width :0 :1 :GLOBAL.g_rect_color :GLOBAL.g_rect_color];
with
[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:
//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.