# :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 
  # 
  # 
  class GCDC < DC
  
    # @overload initialize(windowDC)
    #   Constructs a {Wx::GCDC} from a {Wx::WindowDC}.
    #   @param windowDC [Wx::WindowDC] 
    #   @return [GCDC]
    # @overload initialize(memoryDC)
    #   Constructs a {Wx::GCDC} from a {Wx::MemoryDC}.
    #   @param memoryDC [Wx::MemoryDC] 
    #   @return [GCDC]
    # @overload initialize(printerDC)
    #   Constructs a {Wx::GCDC} from a {Wx::PRT::PrinterDC}.
    #   @param printerDC [Wx::PrinterDC] 
    #   @return [GCDC]
    # @overload initialize(context)
    #   Construct a {Wx::GCDC} from an existing graphics context.
    #   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 with a different context object.
    #   Also notice that context will continue using the same font, pen and brush as before until {Wx::GCDC#set_font}, {Wx::GCDC#set_pen} or {Wx::GCDC#set_brush} is explicitly called to change them. This means that the code can use this {Wx::DC}-derived object to work using pens and brushes with alpha component, for example (which normally isn't supported by {Wx::DC} API), but it also means that the return values of {Wx::GCDC#get_font}, {Wx::GCDC#get_pen} and {Wx::GCDC#get_brush} won't really correspond to the actually used objects because they simply can't represent them anyhow. If you wish to avoid such discrepancy, you need to call the setter methods to bring {Wx::DC} and {Wx::GraphicsContext} font, pen and brush in sync with each other.
    #   @param context [Wx::GraphicsContext] 
    #   @return [GCDC]
    # @overload initialize()
    #   @return [GCDC]
    def initialize(*args) end
    
    # 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