39#include <unordered_map>
40#include <unordered_set>
44#ifdef KICAD_GAL_PROFILE
114 std::pair<int, int>* newGroups =
new std::pair<int, int>[
m_groupsSize + 1];
158 auto it = aReorderMap.find(
m_groups[i].first );
160 if( it != aReorderMap.end() )
174 for(
int layer : aLayers )
177 wxString::Format( wxT(
"Invalid layer number: %d" ), layer ) );
253 typedef std::numeric_limits<int> coord_limits;
254 double pos = coord_limits::lowest() / 2 + coord_limits::epsilon();
255 double size = coord_limits::max() - coord_limits::epsilon();
259 m_allItems.reset(
new std::vector<VIEW_ITEM*> );
274 l.
items = std::make_shared<VIEW_RTREE>();
299 if( aDrawPriority < 0 )
308 previous->unlinkItem( aItem );
318 std::erase_if( layers, [](
int layer )
330 for(
int layer : layers )
333 l.
items->Insert( aItem, bbox );
345 std::unordered_map<int, std::vector<std::pair<VIEW_ITEM*, BOX2I>>> layerBulk;
346 std::unordered_set<VIEW_ITEM*> seen;
349 seen.reserve( aItems.size() );
356 if( !item || !seen.insert( item ).second )
361 if( !item->m_viewPrivData )
365 if(
VIEW* previous = item->m_viewPrivData->m_view )
366 previous->unlinkItem( item );
368 item->m_viewPrivData->
m_view =
this;
369 item->m_viewPrivData->m_drawPriority = drawPriority;
370 const BOX2I bbox = item->ViewBBox();
371 item->m_viewPrivData->m_bbox = bbox;
372 item->m_viewPrivData->m_cachedIndex =
m_allItems->size();
374 std::vector<int> layers = item->ViewGetLayers();
376 std::erase_if( layers, [](
int layer )
384 item->viewPrivData()->saveLayers( layers );
388 for(
int layer : layers )
389 layerBulk[layer].emplace_back( item, bbox );
393 for(
auto& [layerId, items] : layerBulk )
396 l.
items->BulkLoad( items );
420 static int s_gcCounter = 0;
426 wxLogDebug( wxT(
"VIEW::Remove: item %s belongs to a different view" ), aItem->
GetClass() );
430 std::vector<VIEW_ITEM*>::iterator item =
m_allItems->end();
434 && cachedIndex <
static_cast<ssize_t
>(
m_allItems->size() )
451 if( s_gcCounter > 4096 )
457 return it ==
nullptr;
461 for(
size_t idx = 0; idx <
m_allItems->size(); idx++ )
462 ( *
m_allItems )[idx]->m_viewPrivData->m_cachedIndex = idx;
473 l.
items->Remove( aItem, bbox );
480 m_gal->DeleteGroup( prevGroup );
491 wxCHECK( (
unsigned) aLayerId <
m_layers.size(), );
492 wxCHECK( (
unsigned) aRequiredId <
m_layers.size(), );
495 m_layers[aLayerId].requiredLayers.insert( aRequiredId );
497 m_layers[aLayerId].requiredLayers.erase( aRequired );
514 std::vector<VIEW_LAYER*>::const_reverse_iterator i;
521 if( ( *i )->displayOnly || !( *i )->visible )
525 ( *i )->items->Query( aRect, visitor );
528 return aResult.size();
540 if( i->displayOnly || !i->visible )
543 i->items->Query( aRect, aFunc );
563 return fabs( matrix.
GetScale().
x * aSize );
588 wxASSERT_MSG(
false, wxT(
"This is not implemented" ) );
594 bool recacheGroups = (
m_gal != nullptr );
627 wxCHECK( fabs(ssize.
x) > 0 && fabs(ssize.
y) > 0, );
631 double zoom = 1.0 / std::max( fabs( vsize.
x / ssize.
x ), fabs( vsize.
y / ssize.
y ) );
640 wxASSERT_MSG( !aMirrorY,
_(
"Mirroring for Y axis is not supported yet" ) );
644 m_gal->SetFlip( aMirrorX, aMirrorY );
666 m_gal->ComputeWorldScreenMatrix();
695 m_gal->ComputeWorldScreenMatrix();
704 if( obscuringScreenRects.empty() )
707 BOX2D screenRect( { 0, 0 },
m_gal->GetScreenPixelSize() );
711 for(
const BOX2D& obscuringScreenRect : obscuringScreenRects )
727 while( !unobscuredPoly.
IsEmpty() )
729 unobscuredCenter = unobscuredPoly.
BBox().
Centre();
739 m_layers[aLayer].renderingOrder = aRenderingOrder;
748 return m_layers.at( aLayer ).renderingOrder;
754 std::sort( aLayers.begin(), aLayers.end(),
755 [
this](
int a,
int b )
757 return GetLayerOrder( a ) > GetLayerOrder( b );
766 std::map<int, VIEW_LAYER>
moved;
767 std::unordered_set<int> destinations;
769 for(
const auto& [from, to] : aReorderMap )
781 if( destinations.count( to ) )
783 wxLogDebug( wxT(
"VIEW::ReorderLayerData: layer %d also maps to %d, which already "
784 "takes a layer; its items will be lost" ), from, to );
788 destinations.insert( to );
792 for(
const auto& [from, layer] :
moved )
794 auto destination =
m_layers.find( aReorderMap.at( from ) );
796 destination->second = layer;
797 destination->second.id = destination->first;
802 for(
const auto& [from,
_] :
moved )
804 if( !destinations.count( from ) )
805 m_layers.find( from )->second.items = std::make_shared<VIEW_RTREE>();
820 std::vector<int> layers = item->ViewGetLayers();
849 gal->ChangeGroupColor(
group, color );
870 if(
m_gal->IsVisible() )
877 m_layers[aLayer].items->Query( r, visitor );
886 if(
m_gal->IsVisible() )
902 for(
int layer : viewData->
m_layers )
984 std::set<unsigned int>::iterator it;
1004 std::set<unsigned int>::iterator it;
1021 if(
m_gal->IsVisible() )
1037 for(
int layer : viewData->
m_layers )
1079 if( !drawCondition )
1097 return b->viewPrivData()->m_drawPriority
1098 < a->viewPrivData()->m_drawPriority;
1106 return a->viewPrivData()->m_drawPriority
1107 < b->viewPrivData()->m_drawPriority;
1130 if( l->items->IsEmpty() )
1137 m_gal->SetTarget( l->target );
1138 m_gal->SetLayerDepth( l->renderingOrder );
1143 m_gal->StartDiffLayer();
1144 else if( l->hasNegatives )
1145 m_gal->StartNegativesLayer();
1147 l->items->Query( aRect, drawFunc );
1153 m_gal->EndDiffLayer();
1154 else if( l->hasNegatives )
1155 m_gal->EndNegativesLayer();
1162 m_gal->EnableDepthTest(
true );
1163 m_gal->SetLayerDepth( l->renderingOrder );
1165 l->items->Query( aRect, drawFunc );
1206 for(
int layer : layers )
1214 m_gal->SetLayerDepth( it->second.renderingOrder );
1216 draw( aItem, layer, aImmediate );
1223 for(
unsigned int i = 0; i < aGroup->
GetSize(); i++ )
1272 if( item && item->m_viewPrivData )
1273 item->m_viewPrivData->m_view =
nullptr;
1279 layer.items->RemoveAll();
1283 m_gal->ClearCache();
1308#ifdef KICAD_GAL_PROFILE
1309 PROF_TIMER totalRealTime(
"view-redraw-total");
1310 latencyProbeZoomToRender.Checkpoint(
"view-redraw-start");
1325#ifdef KICAD_GAL_PROFILE
1326 totalRealTime.
Stop();
1328 latencyProbeZoomToRender.AddTimer( totalRealTime );
1329 latencyProbeZoomToRender.Checkpoint(
"view-redraw-end");
1337 return m_gal->GetScreenPixelSize();
1367 layer.items->Query( r, visitor );
1375 if( aUpdateFlags &
LAYERS )
1387 for(
int layer : layers )
1393 else if( aUpdateFlags &
COLOR )
1411 for(
auto& [layer_id, layer] :
m_layers )
1422 if(
m_painter->HasUniformColor( aItem, aLayer ) )
1423 m_gal->ChangeGroupColor( aGroup,
m_painter->GetSettings()->GetColor( aItem, aLayer ) );
1495 if( new_bbox == old_bbox )
1500 for(
int layer : layers )
1508 l.
items->Remove( aItem, &old_bbox );
1509 l.
items->Insert( aItem, new_bbox );
1526 if( newLayers == viewData->
m_layers && new_bbox == viewData->
m_bbox )
1540 l.
items->Remove( aItem, &old_bbox );
1546 int prevGroup = viewData->
getGroup( layer );
1548 if( prevGroup >= 0 )
1550 m_gal->DeleteGroup( prevGroup );
1559 for(
int layer : newLayers )
1567 l.
items->Insert( aItem, new_bbox );
1575 auto it =
m_layers.find( aLayerId );
1580 for(
int layer : it->second.requiredLayers )
1586 if( it2 ==
m_layers.end() || !it2->second.visible )
1608 l.items->Query( r, visitor );
1616 if( !
m_gal->IsVisible() || !
m_gal->IsInitialized() )
1619#ifdef KICAD_GAL_PROFILE
1620 latencyProbeZoomToRender.Checkpoint(
"view-update-items");
1626 unsigned int cntGeomUpdate = 0;
1627 bool anyUpdated =
false;
1634 auto vpd = item->viewPrivData();
1639 if( vpd->m_requiredUpdate !=
NONE )
1650 double ratio = (double) cntGeomUpdate / (
double) cntTotal;
1661 layer.items->RemoveAll();
1664 std::unordered_map<int, std::vector<std::pair<VIEW_ITEM*, BOX2I>>> layerBulk;
1671 const BOX2I bbox = item->ViewBBox();
1672 item->m_viewPrivData->m_bbox = bbox;
1674 std::vector<int> layers = item->ViewGetLayers();
1675 item->viewPrivData()->saveLayers( layers );
1677 for(
int layer : layers )
1681 wxCHECK2_MSG( it !=
m_layers.end(),
continue, wxS(
"Invalid layer" ) );
1682 layerBulk[layer].emplace_back( item, bbox );
1688 if( item->viewPrivData()->m_requiredUpdate & (
LAYERS |
GEOMETRY ) )
1690 item->viewPrivData()->m_requiredUpdate &= ~(
LAYERS |
GEOMETRY );
1691 item->viewPrivData()->m_requiredUpdate |=
REPAINT;
1696 for(
auto& [layerId, items] : layerBulk )
1698 auto it =
m_layers.find( layerId );
1702 it->second.items->BulkLoad( items );
1710 bool updatesProcessed =
true;
1720 if( item && item->viewPrivData() && item->viewPrivData()->m_requiredUpdate !=
NONE )
1723 item->viewPrivData()->m_requiredUpdate =
NONE;
1729 updatesProcessed =
false;
1733#ifdef KICAD_GAL_PROFILE
1734 wxLogTrace(
traceGalProfile, wxS(
"View update: total items %u, geom %u anyUpdated %u" ),
1735 cntTotal, cntGeomUpdate, (
unsigned) anyUpdated );
1738 if( updatesProcessed )
1745 if( aUpdateFlags ==
NONE )
1750 if( item && item->viewPrivData() )
1752 item->viewPrivData()->m_requiredUpdate |= aUpdateFlags;
1760 std::function<
bool(
VIEW_ITEM* )> aCondition )
1762 if( aUpdateFlags ==
NONE )
1770 if( aCondition( item ) )
1772 if( item->viewPrivData() )
1774 item->viewPrivData()->m_requiredUpdate |= aUpdateFlags;
1789 if( item->viewPrivData() )
1791 int flags = aItemFlagsProvider( item );
1792 item->viewPrivData()->m_requiredUpdate |= flags;
1804 std::unique_ptr<VIEW> ret = std::make_unique<VIEW>();
1808 ret->SortOrderedLayers();
1825 if( cur_visible != aIsVisible )
1882 return viewData && viewData->
m_view ==
this;
1899 assert( aUpdateFlags !=
NONE );
1908 std::shared_ptr<VIEW_OVERLAY>
overlay = std::make_shared<VIEW_OVERLAY>();
1939 Hide( aItem,
false );
1942 if( aTakeOwnership )
1959 for(
const auto& layer :
m_layers )
constexpr int ARC_LOW_DEF
constexpr BOX2I BOX2ISafe(const BOX2D &aInput)
constexpr void SetMaximum()
constexpr void SetOrigin(const Vec &pos)
constexpr BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
constexpr size_type GetWidth() const
constexpr Vec Centre() const
constexpr size_type GetHeight() const
constexpr const SizeVec & GetSize() const
constexpr void SetEnd(coord_type x, coord_type y)
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
Contains all the knowledge about how to draw graphical object onto any particular output device.
Extend VIEW_ITEM by possibility of grouping items into a single object.
virtual unsigned int GetSize() const
Return the number of stored items.
virtual VIEW_ITEM * GetItem(unsigned int aIdx) const
bool storesGroups() const
Return information if the item uses at least one group id (ie.
std::vector< int > m_layers
int requiredUpdate() const
Return current update flag for an item.
int m_requiredUpdate
Flag required for updating.
int m_flags
Visibility flags.
int m_cachedIndex
Cached index in m_allItems.
void deleteGroups()
Remove all of the stored group ids.
bool isRenderable() const
Return if the item should be drawn or not.
int m_drawPriority
Order to draw this item in a layer, lowest first.
VIEW * m_view
Current dynamic view the item is assigned to.
std::pair< int, int > * m_groups
layer_number:group_id pairs for each layer the item occupies.
int getGroup(int aLayer) const
Return number of the group id for the given layer, or -1 in case it was not cached before.
void reorderGroups(const std::unordered_map< int, int > &aReorderMap)
Reorder the stored groups (to facilitate reordering of layers).
BOX2I m_bbox
Stores layer numbers used by the item.
void setGroup(int aLayer, int aGroup)
Set a group id for the item and the layer combination.
void saveLayers(const std::vector< int > &aLayers)
Save layers used by the item.
void clearUpdateFlags()
Mark an item as already updated, so it is not going to be redrawn.
virtual const BOX2I ViewBBox() const =0
Return the bounding box of the item covering all its layers.
double m_forcedTransparency
Additional transparency for diff'ing items.
VIEW_ITEM_DATA * viewPrivData() const
virtual void ViewDraw(int aLayer, VIEW *aView) const
Draw the parts of the object belonging to layer aLayer.
virtual std::vector< int > ViewGetLayers() const =0
Return the all the layers within the VIEW the object is painted on.
virtual wxString GetClass() const =0
Return the class name.
virtual double ViewGetLOD(int aLayer, const VIEW *aView) const
Return the level of detail (LOD) of the item.
VIEW_ITEM_DATA * m_viewPrivData
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetMirror(bool aMirrorX, bool aMirrorY)
Control the mirroring of the VIEW.
void ShowPreview(bool aShow=true)
BOX2D GetViewport() const
Return the current viewport visible area rectangle.
void CopySettings(const VIEW *aOtherView)
Copy layers and visibility settings from another view.
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
static constexpr int TOP_LAYER_MODIFIER
Rendering order modifier for layers that are marked as top layers.
void draw(VIEW_ITEM *aItem, int aLayer, bool aImmediate=false)
Draw an item, but on a specified layers.
bool m_reverseDrawOrder
Flag to reverse the draw order when using draw priority.
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
void updateItemColor(VIEW_ITEM *aItem, int aLayer)
Update colors that are used for an item to be drawn.
void SetViewport(const BOX2D &aViewport)
Set the visible area of the VIEW.
void SetRequired(int aLayerId, int aRequiredId, bool aRequired=true)
Mark the aRequiredId layer as required for the aLayerId layer.
VECTOR2D ToScreen(const VECTOR2D &aCoord, bool aAbsolute=true) const
Convert a world space point/vector to a point/vector in screen space coordinates.
void recolorGroup(VIEW_ITEM *aItem, int aLayer, int aGroup)
static bool compareRenderingOrder(VIEW_LAYER *aI, VIEW_LAYER *aJ)
Determine rendering order of layers. Used in display order sorting function.
int GetLayerOrder(int aLayer) const
Return rendering order of a particular layer.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void ClearTargets()
Clear targets that are marked as dirty.
virtual void EnableTopLayer(bool aEnable)
Enable or disable display of the top layer.
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
std::shared_ptr< std::vector< VIEW_ITEM * > > m_allItems
Flat list of all items.
std::shared_ptr< VIEW_OVERLAY > MakeOverlay()
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
int Query(const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const
Find all visible items that touch or are within the rectangle aRect.
std::vector< VIEW_ITEM * > m_ownedItems
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
void invalidateItem(VIEW_ITEM *aItem, int aUpdateFlags)
Manage dirty flags & redraw queuing when updating an item.
const VECTOR2I & GetScreenPixelSize() const
Return the size of the our rendering area in pixels.
bool HasItem(const VIEW_ITEM *aItem) const
Indicates whether or not the given item has been added to the view.
virtual int GetTopLayer() const
PAINTER * m_painter
PAINTER contains information how do draw items.
virtual void Redraw()
Immediately redraws the whole view.
void Clear()
Remove all items from the view.
std::set< unsigned int > m_topLayers
The set of layers that are displayed on the top.
bool m_enableOrderModifier
Whether to use rendering order modifier or not.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
bool IsHiddenOnOverlay(const VIEW_ITEM *aItem) const
void ClearTopLayers()
Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
void SetLayerOrder(int aLayer, int aRenderingOrder, bool aAutoSort=true)
Set rendering order of a particular layer.
void MarkClean()
Force redraw of view on the next rendering.
void updateItemGeometry(VIEW_ITEM *aItem, int aLayer)
Update all information needed to draw an item.
static constexpr int VIEW_MAX_LAYERS
Maximum number of layers that may be shown.
void updateLayers(VIEW_ITEM *aItem)
Update set of layers that an item occupies.
void RecacheAllItems()
Rebuild GAL display lists.
bool areRequiredLayersEnabled(int aLayerId) const
Check if every layer required by the aLayerId layer is enabled.
bool IsTargetDirty(int aTarget) const
Return true if any of layers belonging to the target or the target itself should be redrawn.
int m_nextDrawPriority
The next sequential drawing priority.
bool m_useDrawPriority
Flag to respect draw priority when drawing items.
void UpdateItems()
Iterate through the list of items that asked for updating and updates them.
void SyncLayerVisibilityCache()
bool IsCached(int aLayer) const
Return true if the layer is cached.
void AddBatch(const std::vector< VIEW_ITEM * > &aItems)
Add a batch of items to the view, using bulk-loaded R-trees for initial population.
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
void SortLayers(std::vector< int > &aLayers) const
Change the order of given layer ids, so after sorting the order corresponds to layers rendering order...
BASE_SET m_layerVisibilityCache
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
bool m_hasPendingItemUpdates
True when at least one item has deferred update flags that still need processing.
std::unique_ptr< KIGFX::VIEW_GROUP > m_preview
static void OnDestroy(VIEW_ITEM *aItem)
Nasty hack, invoked by the destructor of VIEW_ITEM to auto-remove the item from the owning VIEW if th...
GAL * m_gal
Interface to PAINTER that is used to draw items.
std::map< int, VIEW_LAYER > m_layers
The set of possible displayed layers and its properties.
std::unique_ptr< VIEW > DataReference() const
Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.
void Hide(VIEW_ITEM *aItem, bool aHide=true, bool aHideOverlay=false)
Temporarily hide the item in the view (e.g.
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Set given layer to be displayed on the top or sets back the default order of layers.
void AddToPreview(VIEW_ITEM *aItem, bool aTakeOwnership=true)
void UpdateLayerColor(int aLayer)
Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed.
void MarkDirty()
Force redraw of view on the next rendering.
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
std::vector< VIEW_LAYER * > m_orderedLayers
Sorted list of pointers to members of m_layers.
void clearGroupCache()
Clear cached GAL group numbers (ONLY numbers stored in VIEW_ITEMs, not group objects used by GAL).
VECTOR2D m_center
Center point of the VIEW (the point at which we are looking at).
void SortOrderedLayers()
Sorts m_orderedLayers after layer rendering order has changed.
void unlinkItem(VIEW_ITEM *aItem)
Detach a single VIEW_ITEM from this view.
void MarkTargetDirty(int aTarget)
Set or clear target 'dirty' flag.
void updateBbox(VIEW_ITEM *aItem)
Update bounding box of an item.
bool IsVisible(const VIEW_ITEM *aItem) const
Return information if the item is visible (or not).
BASE_SET m_layerCachedFlagCache
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
void ReorderLayerData(std::unordered_map< int, int > aReorderMap)
Remap the data between layer ids without invalidating that data.
void redrawRect(const BOX2I &aRect)
Redraw contents within rectangle aRect.
VECTOR2< T > GetScale() const
Get the scale components of the matrix.
A small class to help profiling.
void Stop()
Save the time when this function was called, and set the counter stane to stop.
double msecs(bool aSinceLast=false)
Represent a set of closed polygons.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
@ ALLOW_ACUTE_CORNERS
just inflate the polygon. Acute angles create spikes
const wxChar *const traceGalProfile
Flag to enable debug output of GAL performance profiling.
MATRIX3x3< double > MATRIX3x3D
The Cairo implementation of the graphics abstraction layer.
@ COLOR
Color has changed.
@ INITIAL_ADD
Item is being added to the view.
@ NONE
No updates are required.
@ REPAINT
Item needs to be redrawn.
@ APPEARANCE
Visibility flag has changed.
@ GEOMETRY
Position or shape has changed.
@ LAYERS
Layers have changed.
@ ALL
All except INITIAL_ADD.
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_CACHED
Main rendering target (cached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
@ HIDDEN
Item is temporarily hidden (usually in favor of a being drawn from an overlay, such as a SELECTION).
@ OVERLAY_HIDDEN
Item is temporarily hidden from being drawn on an overlay.
@ VISIBLE
Item is visible (in general)
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > overlay
bool operator()(VIEW_ITEM *aItem)
CLEAR_LAYER_CACHE_VISITOR(VIEW *aView)
bool operator()(VIEW_ITEM *aItem)
DRAW_ITEM_VISITOR(VIEW *aView, int aLayer, bool aUseDrawPriority, bool aReverseDrawOrder)
bool foundForcedTransparent
int layers[VIEW_MAX_LAYERS]
bool drawForcedTransparent
std::vector< VIEW_ITEM * > drawItems
bool operator()(VIEW_ITEM *aItem)
RECACHE_ITEM_VISITOR(VIEW *aView, GAL *aGal, int aLayer)
bool operator()(VIEW_ITEM *aItem)
UPDATE_COLOR_VISITOR(int aLayer, PAINTER *aPainter, GAL *aGal)
UPDATE_DEPTH_VISITOR(int aLayer, int aDepth, GAL *aGal)
bool operator()(VIEW_ITEM *aItem)
bool diffLayer
Layer should be drawn differentially over lower layers.
int renderingOrder
Rendering order of this layer.
bool hasNegatives
Layer should be drawn separately to not delete lower layers.
bool visible
Is the layer to be rendered?
bool displayOnly
Is the layer display only?
std::shared_ptr< VIEW_RTREE > items
R-tree indexing all items on this layer.
RENDER_TARGET target
Where the layer should be rendered.
wxLogTrace helper definitions.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D