Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | List of all members
eZMath Class Reference

eZMath provide a simple math library for common math operations More...

## Static Public Member Functions
static | normalizeColorArray ( $array)
static | rgbToCMYK ( $rgbArray)
static | rgbToCMYK2 ( $r, $g, $b)

## Detailed Description

eZMath provide a simple math library for common math operations

Definition at line 20 of file ezmath.php.

## Member Function Documentation

## ◆ normalizeColorArray()

static eZMath::normalizeColorArray | ( |  | $array | ) |
| static

Normalize RGB color array to 0..1 range

Parameters

  array | to normalize

Returns
  normalized array

Definition at line 31 of file ezmath.php.

Referenced by eZPDF\modify().

## ◆ rgbToCMYK()

static eZMath::rgbToCMYK | ( |  | $rgbArray | ) |
| static

Convert RGB to CMYK, Normalized values, between 0 and 1

Parameters

  rgbArray | RGB array

Returns
  CMYK array

Definition at line 49 of file ezmath.php.

Referenced by Cpdf\__construct(), Cpdf\o_shading(), and rgbToCMYK2().

## ◆ rgbToCMYK2()

static eZMath::rgbToCMYK2 | ( |  | $r,
|  |  | $g,
|  |  | $b
| ) |  |
| static

Convert rgb to CMYK

Parameters

  r | R
  g | G
  b | B

Returns
  CMYK return array

Definition at line 81 of file ezmath.php.

References rgbToCMYK().

Referenced by eZPDFTable\ezTable(), eZPDF\modify(), Cpdf\o_shading(), eZPDFTable\pushStack(), Cpdf\setColorRGB(), and Cpdf\setStrokeColorRGB().

The documentation for this class was generated from the following file:

- ezmath.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.