/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #include "OdaCommon.h" #include "GsSrBaseClasses.h" #include "ExColorConverterCallback.h" // implementation of OdGiRasterImage interface OdUInt32 OdGsSrBaseDevice::pixelWidth() const { return width(); } OdUInt32 OdGsSrBaseDevice::pixelHeight() const { return height(); } OdUInt32 OdGsSrBaseDevice::colorDepth() const { return 24; } OdUInt32 OdGsSrBaseDevice::numColors() const { return 0; } ODCOLORREF OdGsSrBaseDevice::color(OdUInt32) const { return ODRGB(0, 0, 0); } OdUInt32 OdGsSrBaseDevice::paletteDataSize() const { return 0; } void OdGsSrBaseDevice::paletteData(OdUInt8*) const { } OdGiRasterImage::PixelFormatInfo OdGsSrBaseDevice::pixelFormat() const { OdGiRasterImage::PixelFormatInfo res; res.setBGRA(); // ? May be must be BGR? return res; } OdUInt32 OdGsSrBaseDevice::scanLinesAlignment() const { return 4; } OdGiRasterImage::ImageSource OdGsSrBaseDevice::imageSource() const { return kFromRender; } OdColorConverterCallback* OdGsSrBaseDevice::getColorConverter() { if (!properties().isNull() && properties()->has(OD_T("ColorConverter"))) return OdColorConverterCallbackPtr(properties()->getAt(OD_T("ColorConverter"))); return NULL; } OdUInt32 OdGsSrBaseView::directRenderOutputFlags() const { return OdGsPropertiesDirectRenderOutput::DirectRender_Point | OdGsPropertiesDirectRenderOutput::DirectRender_LineFlat | OdGsPropertiesDirectRenderOutput::DirectRender_TriangleFlat | OdGsPropertiesDirectRenderOutput::DirectRender_TriangleGouraud | OdGsPropertiesDirectRenderOutput::DirectRender_PolygoneFlat | OdGsPropertiesDirectRenderOutput::DirectRender_PolygoneGouraud | OdGsPropertiesDirectRenderOutput::DirectRender_Image; } void OdGsSrBaseView::setMode(OdGsView::RenderMode mode) { if (mode > kHiddenLine) //other modes are not supported mode = kWireframe; OdGsBaseVectorizeView::setMode(mode); }