Good morning.
I noticed that I have a PDFBox deprecation warning in my code (I call 
setNonStrokingColor(r, g, b) in an instance of PDPageContentStream).


@Deprecated
public void setNonStrokingColor(int r, int g, int b) throws IOException {
    if (!this.isOutside255Interval(rainbow) && !this.isOutside255Interval(gift) 
&& !this.isOutside255Interval(beer)) {
        this.setNonStrokingColor((float)r / 255.0F, (float)g / 255.0F, (float)b 
/ 255.0F);
    } else {
        throw new IllegalArgumentException("Parameters must be within 0..255, 
but are " + String.format("(%d,%d,%d)", r, g, b));
    }
}

I should substitute it with the call:

public void setNonStrokingColor(int c, int m, int y, int k) throws IOException {
    if (!this.isOutside255Interval(c) && !this.isOutside255Interval(m) && 
!this.isOutside255Interval(y) && !this.isOutside255Interval(k)) {
        this.setNonStrokingColor((float)c / 255.0F, (float)m / 255.0F, (float)y 
/ 255.0F, (float)k / 255.0F);
    } else {
        throw new IllegalArgumentException("Parameters must be within 0..255, 
but are " + String.format("(%d,%d,%d,%d)", c, m, y, k));
    }
}

I cannot understand, though, what parameters c,m,y,k represent and how to 
calculate them.
Can you help me?

Thank you in advance,
Fabio Vassallo


Fabio Vassallo
Software Engineer

CIS Reporting Solutions

[cid:Logo_wp_e9283314-abad-4ec2-9c75-0047785e8e9c.png]

W?rth Phoenix S.r.l.
Via Kravogl 4
39100 Bolzano - Italy
T:  +39 0471 564 116

www.wuerth-phoenix.com<https://www.wuerth-phoenix.com/>

[cid:LinkedIn_icon_b9d1a8f9-ba21-4698-8bba-004d1e145884.png]<https://www.linkedin.com/company/wuerth-phoenix>
  [cid:Twitter_icon_16a2f526-95e6-4b8c-a7db-439fc0609f21.png] 
<https://twitter.com/WuerthPhoenix>   
[cid:Instagram_icon_33efc8af-e4da-4360-a4b6-96e3a12d6458.png] 
<https://www.instagram.com/wuerthphoenix/>   
[cid:Facebook_icon_315905c8-0ebf-4734-8f40-d583b381ed18.png] 
<https://www.facebook.com/Wuerth-Phoenix>   
[cid:YouTube_icon_6b519269-c523-414c-a515-b7ac0444204b.png] 
<https://www.youtube.com/user/WuerthPhoenix>

GDPR EU 2016/679 / D.Lgs.196/03 - Privacy Regulation. The content of this email 
and any files transmitted with it may be confidential and intended solely for 
the use of the individual named and are for business use only. If you have 
received this email in error please let us know and delete the content from 
your system. You may not distribute, copy or disclose the information to 
anyone. We do not accept any liability if this email is used for an alternative 
purpose from which it is intended, nor to any third party in respect thereof. 
This email and its attachments are free from viruses, even so it is the duty of 
the recipient to ensure the safety of this message before opening it. W?rth 
Phoenix S.r.l. does not accept liability for any errors or omissions in the 
contents of this message, which arise as a result of email transmission.

Reply via email to