FreeRDP
gdi.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <winpr/crt.h>
#include <freerdp/api.h>
#include <freerdp/log.h>
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/pen.h>
#include <freerdp/gdi/shape.h>
#include <freerdp/gdi/region.h>
#include <freerdp/gdi/bitmap.h>
#include "drawing.h"
#include "clipping.h"
#include "brush.h"
#include "line.h"
#include "gdi.h"
#include "../core/graphics.h"

Macros

#define TAG   FREERDP_TAG("gdi")
 

Functions

INLINE BOOL gdi_decode_color (rdpGdi *gdi, const UINT32 srcColor, UINT32 *color, UINT32 *format)
 
DWORD gdi_rop3_code (BYTE code)
 
const char * gdi_rop3_code_string (BYTE code)
 
const char * gdi_rop3_string (DWORD rop)
 
UINT32 gdi_get_pixel_format (UINT32 bitsPerPixel)
 
gdiBitmap * gdi_bitmap_new_ex (rdpGdi *gdi, int width, int height, int bpp, BYTE *data)
 
void gdi_bitmap_free_ex (gdiBitmap *bitmap)
 
BOOL gdi_bitmap_update (rdpContext *context, const BITMAP_UPDATE *bitmapUpdate)
 
static BOOL gdi_palette_update (rdpContext *context, const PALETTE_UPDATE *palette)
 
static BOOL gdi_set_bounds (rdpContext *context, const rdpBounds *bounds)
 
static BOOL gdi_dstblt (rdpContext *context, const DSTBLT_ORDER *dstblt)
 
static BOOL gdi_patblt (rdpContext *context, PATBLT_ORDER *patblt)
 
static BOOL gdi_scrblt (rdpContext *context, const SCRBLT_ORDER *scrblt)
 
static BOOL gdi_opaque_rect (rdpContext *context, const OPAQUE_RECT_ORDER *opaque_rect)
 
static BOOL gdi_multi_opaque_rect (rdpContext *context, const MULTI_OPAQUE_RECT_ORDER *multi_opaque_rect)
 
static BOOL gdi_line_to (rdpContext *context, const LINE_TO_ORDER *lineTo)
 
static BOOL gdi_polyline (rdpContext *context, const POLYLINE_ORDER *polyline)
 
static BOOL gdi_memblt (rdpContext *context, MEMBLT_ORDER *memblt)
 
static BOOL gdi_mem3blt (rdpContext *context, MEM3BLT_ORDER *mem3blt)
 
static BOOL gdi_polygon_sc (rdpContext *context, const POLYGON_SC_ORDER *polygon_sc)
 
static BOOL gdi_polygon_cb (rdpContext *context, POLYGON_CB_ORDER *polygon_cb)
 
static BOOL gdi_ellipse_sc (rdpContext *context, const ELLIPSE_SC_ORDER *ellipse_sc)
 
static BOOL gdi_ellipse_cb (rdpContext *context, const ELLIPSE_CB_ORDER *ellipse_cb)
 
static BOOL gdi_frame_marker (rdpContext *context, const FRAME_MARKER_ORDER *frameMarker)
 
BOOL gdi_surface_frame_marker (rdpContext *context, const SURFACE_FRAME_MARKER *surfaceFrameMarker)
 
static BOOL gdi_surface_bits (rdpContext *context, const SURFACE_BITS_COMMAND *cmd)
 
static void gdi_register_update_callbacks (rdpUpdate *update)
 
static BOOL gdi_init_primary (rdpGdi *gdi, UINT32 stride, UINT32 format, BYTE *buffer, void(*pfree)(void *))
 
BOOL gdi_resize (rdpGdi *gdi, UINT32 width, UINT32 height)
 
BOOL gdi_resize_ex (rdpGdi *gdi, UINT32 width, UINT32 height, UINT32 stride, UINT32 format, BYTE *buffer, void(*pfree)(void *))
 
BOOL gdi_init (freerdp *instance, UINT32 format)
 
BOOL gdi_init_ex (freerdp *instance, UINT32 format, UINT32 stride, BYTE *buffer, void(*pfree)(void *))
 
void gdi_free (freerdp *instance)
 
BOOL gdi_send_suppress_output (rdpGdi *gdi, BOOL suppress)
 

Variables

static const rop_table_entry rop3_code_table []
 
static const BYTE GDI_BS_HATCHED_PATTERNS []
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("gdi")

FreeRDP: A Remote Desktop Protocol Implementation GDI Library

Copyright 2010-2011 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

void gdi_bitmap_free_ex ( gdiBitmap *  bitmap)

Here is the call graph for this function:

Here is the caller graph for this function:

gdiBitmap* gdi_bitmap_new_ex ( rdpGdi *  gdi,
int  width,
int  height,
int  bpp,
BYTE data 
)

Here is the call graph for this function:

BOOL gdi_bitmap_update ( rdpContext *  context,
const BITMAP_UPDATE *  bitmapUpdate 
)

FreeRDP: A Remote Desktop Protocol Implementation GDI Library

Copyright 2010-2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

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.

Here is the call graph for this function:

Here is the caller graph for this function:

INLINE BOOL gdi_decode_color ( rdpGdi *  gdi,
const UINT32  srcColor,
UINT32 color,
UINT32 format 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_dstblt ( rdpContext *  context,
const DSTBLT_ORDER *  dstblt 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_ellipse_cb ( rdpContext *  context,
const ELLIPSE_CB_ORDER *  ellipse_cb 
)
static

Here is the caller graph for this function:

static BOOL gdi_ellipse_sc ( rdpContext *  context,
const ELLIPSE_SC_ORDER *  ellipse_sc 
)
static

Here is the caller graph for this function:

static BOOL gdi_frame_marker ( rdpContext *  context,
const FRAME_MARKER_ORDER *  frameMarker 
)
static

Here is the caller graph for this function:

void gdi_free ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

UINT32 gdi_get_pixel_format ( UINT32  bitsPerPixel)

Here is the caller graph for this function:

BOOL gdi_init ( freerdp *  instance,
UINT32  format 
)

Initialize GDI

Parameters
instcurrent instance
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL gdi_init_ex ( freerdp *  instance,
UINT32  format,
UINT32  stride,
BYTE buffer,
void(*)(void *)  pfree 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_init_primary ( rdpGdi *  gdi,
UINT32  stride,
UINT32  format,
BYTE buffer,
void(*)(void *)  pfree 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_line_to ( rdpContext *  context,
const LINE_TO_ORDER *  lineTo 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_mem3blt ( rdpContext *  context,
MEM3BLT_ORDER *  mem3blt 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_memblt ( rdpContext *  context,
MEMBLT_ORDER *  memblt 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_multi_opaque_rect ( rdpContext *  context,
const MULTI_OPAQUE_RECT_ORDER *  multi_opaque_rect 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_opaque_rect ( rdpContext *  context,
const OPAQUE_RECT_ORDER *  opaque_rect 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_palette_update ( rdpContext *  context,
const PALETTE_UPDATE *  palette 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_patblt ( rdpContext *  context,
PATBLT_ORDER *  patblt 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_polygon_cb ( rdpContext *  context,
POLYGON_CB_ORDER *  polygon_cb 
)
static

Here is the caller graph for this function:

static BOOL gdi_polygon_sc ( rdpContext *  context,
const POLYGON_SC_ORDER *  polygon_sc 
)
static

Here is the caller graph for this function:

static BOOL gdi_polyline ( rdpContext *  context,
const POLYLINE_ORDER *  polyline 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void gdi_register_update_callbacks ( rdpUpdate *  update)
static

Register GDI callbacks with libfreerdp-core.

Parameters
instcurrent instance
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL gdi_resize ( rdpGdi *  gdi,
UINT32  width,
UINT32  height 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL gdi_resize_ex ( rdpGdi *  gdi,
UINT32  width,
UINT32  height,
UINT32  stride,
UINT32  format,
BYTE buffer,
void(*)(void *)  pfree 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD gdi_rop3_code ( BYTE  code)

Here is the caller graph for this function:

const char* gdi_rop3_code_string ( BYTE  code)

Here is the caller graph for this function:

const char* gdi_rop3_string ( DWORD  rop)
static BOOL gdi_scrblt ( rdpContext *  context,
const SCRBLT_ORDER *  scrblt 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL gdi_send_suppress_output ( rdpGdi *  gdi,
BOOL  suppress 
)

Here is the caller graph for this function:

static BOOL gdi_set_bounds ( rdpContext *  context,
const rdpBounds *  bounds 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL gdi_surface_bits ( rdpContext *  context,
const SURFACE_BITS_COMMAND *  cmd 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL gdi_surface_frame_marker ( rdpContext *  context,
const SURFACE_FRAME_MARKER *  surfaceFrameMarker 
)

Here is the caller graph for this function:

Variable Documentation

const BYTE GDI_BS_HATCHED_PATTERNS[]
static
Initial value:
=
{
0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7,
0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F,
0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE,
0xF7, 0xF7, 0xF7, 0x00, 0xF7, 0xF7, 0xF7, 0xF7,
0x7E, 0xBD, 0xDB, 0xE7, 0xE7, 0xDB, 0xBD, 0x7E
}
const rop_table_entry rop3_code_table[]
static