# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # {Wx::GCDC} is a device context that draws on a {Wx::GraphicsContext}. # {Wx::GCDC} does its best to implement {Wx::DC} API, but the following features are not (fully) implemented because {Wx::GraphicsContext} doesn't support them: # # - {Wx::GCDC#get_pixel} method is not implemented and always returns false because modern graphics layers don't support retrieving the contents of the drawn pixels. # - {Wx::GCDC#flood_fill} method is not, and can't be, implemented, as its functionality relies on reading the pixels from {Wx::GraphicsContext} too. # - {Wx::GCDC#set_logical_function} method only works with {Wx::RasterOperationMode::COPY}, {Wx::RasterOperationMode::OR}, {Wx::RasterOperationMode::NO_OP}, {Wx::RasterOperationMode::CLEAR} and {Wx::RasterOperationMode::XOR} functions, attempts to use any other function (including {Wx::RasterOperationMode::INVERT}) don't do anything. # - Similarly, {Wx::RasterOperationMode} parameter of {Wx::GCDC#blit} and {Wx::GCDC#stretch_blit} can only be one of the supported logical functions listed above, using any other function will result in an assertion failure and not drawing anything. # - For Direct2D-based {Wx::GraphicsContext}, only true-type fonts can be used in the font-related functions. # # === # # Category: Device Contexts # @see Wx::DC # @see Wx::GraphicsContext # # # # @note This class is untracked and should not be derived from nor instances extended! class GCDC < DC # Retrieves associated {Wx::GraphicsContext}. # @return [Wx::GraphicsContext] def get_graphics_context; end alias_method :graphics_context, :get_graphics_context # Set the graphics context to be used for this {Wx::GCDC}. # Note that this object takes ownership of context and will delete it when it is destroyed or when {Wx::GCDC#set_graphics_context} is called again. # Also, unlike the constructor taking {Wx::GraphicsContext}, this method will reapply the current font, pen and brush, so that this object continues to use them, if they had been changed before (which is never the case when constructing {Wx::GCDC} directly from {Wx::GraphicsContext}). # @param context [Wx::GraphicsContext] # @return [void] def set_graphics_context(context) end alias_method :graphics_context=, :set_graphics_context end # GCDC end