FreeRDP
color.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <winpr/crt.h>
#include <freerdp/log.h>
#include <freerdp/freerdp.h>
#include <freerdp/primitives.h>

Macros

#define TAG   FREERDP_TAG("color")
 

Functions

BYTEfreerdp_glyph_convert (UINT32 width, UINT32 height, const BYTE *data)
 
BOOL freerdp_image_copy_from_monochrome (BYTE *pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, const BYTE *pSrcData, UINT32 backColor, UINT32 foreColor, const gdiPalette *palette)
 
static INLINE UINT32 freerdp_image_inverted_pointer_color (UINT32 x, UINT32 y, UINT32 format)
 
BOOL freerdp_image_copy_from_pointer_data (BYTE *pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, const BYTE *xorMask, UINT32 xorMaskLength, const BYTE *andMask, UINT32 andMaskLength, UINT32 xorBpp, const gdiPalette *palette)
 
static INLINE BOOL overlapping (const BYTE *pDstData, UINT32 nXDst, UINT32 nYDst, UINT32 nDstStep, UINT32 dstBytesPerPixel, const BYTE *pSrcData, UINT32 nXSrc, UINT32 nYSrc, UINT32 nSrcStep, UINT32 srcBytesPerPixel, UINT32 nWidth, UINT32 nHeight)
 
BOOL freerdp_image_copy (BYTE *pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, const BYTE *pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc, const gdiPalette *palette, UINT32 flags)
 
BOOL freerdp_image_fill (BYTE *pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 color)
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("color")

FreeRDP: A Remote Desktop Protocol Implementation Color Conversion Routines

Copyright 2010 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2016 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2016 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

BYTE* freerdp_glyph_convert ( UINT32  width,
UINT32  height,
const BYTE data 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_image_copy ( BYTE pDstData,
DWORD  DstFormat,
UINT32  nDstStep,
UINT32  nXDst,
UINT32  nYDst,
UINT32  nWidth,
UINT32  nHeight,
const BYTE pSrcData,
DWORD  SrcFormat,
UINT32  nSrcStep,
UINT32  nXSrc,
UINT32  nYSrc,
const gdiPalette *  palette,
UINT32  flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_image_copy_from_monochrome ( BYTE pDstData,
UINT32  DstFormat,
UINT32  nDstStep,
UINT32  nXDst,
UINT32  nYDst,
UINT32  nWidth,
UINT32  nHeight,
const BYTE pSrcData,
UINT32  backColor,
UINT32  foreColor,
const gdiPalette *  palette 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_image_copy_from_pointer_data ( BYTE pDstData,
UINT32  DstFormat,
UINT32  nDstStep,
UINT32  nXDst,
UINT32  nYDst,
UINT32  nWidth,
UINT32  nHeight,
const BYTE xorMask,
UINT32  xorMaskLength,
const BYTE andMask,
UINT32  andMaskLength,
UINT32  xorBpp,
const gdiPalette *  palette 
)

Drawing Monochrome Pointers: http://msdn.microsoft.com/en-us/library/windows/hardware/ff556143/

Drawing Color Pointers: http://msdn.microsoft.com/en-us/library/windows/hardware/ff556138/

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_image_fill ( BYTE pDstData,
DWORD  DstFormat,
UINT32  nDstStep,
UINT32  nXDst,
UINT32  nYDst,
UINT32  nWidth,
UINT32  nHeight,
UINT32  color 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE UINT32 freerdp_image_inverted_pointer_color ( UINT32  x,
UINT32  y,
UINT32  format 
)
static

Inverted pointer colors (where individual pixels can change their color to accommodate the background behind them) only seem to be supported on Windows. Using a static replacement color for these pixels (e.g. black) might result in invisible pointers depending on the background. This function returns either black or white, depending on the pixel's position.

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE BOOL overlapping ( const BYTE pDstData,
UINT32  nXDst,
UINT32  nYDst,
UINT32  nDstStep,
UINT32  dstBytesPerPixel,
const BYTE pSrcData,
UINT32  nXSrc,
UINT32  nYSrc,
UINT32  nSrcStep,
UINT32  srcBytesPerPixel,
UINT32  nWidth,
UINT32  nHeight 
)
static

Here is the caller graph for this function: