Skip to content

Commit

Permalink
I am adding missing additional rendering APIs in the OSWindow-Core pa…
Browse files Browse the repository at this point in the history
…ckage.
  • Loading branch information
ronsaldo committed Jun 24, 2020
1 parent a9666ce commit dc68395
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/OSWindow-Core/OSWindowGenericRenderer.class.st
Expand Up @@ -12,6 +12,12 @@ OSWindowGenericRenderer >> clear [
self subclassResponsibility
]

{ #category : #clipping }
OSWindowGenericRenderer >> clippingBounds: aRectangle [
"This methods sets a new clipping rectangle for the whole renderer output."
self subclassResponsibility
]

{ #category : #rendering }
OSWindowGenericRenderer >> color: aColor [
self subclassResponsibility
Expand All @@ -32,13 +38,61 @@ OSWindowGenericRenderer >> drawRectangle: aRectangle [
self subclassResponsibility
]

{ #category : #rendering }
OSWindowGenericRenderer >> drawString: aString from: firstIndex to: lastIndex in: bounds font: font color: c underline: underline underlineColor: uc strikethrough: strikethrough strikethroughColor: sc kern: kern [
self subclassResponsibility
]

{ #category : #rendering }
OSWindowGenericRenderer >> drawTexture: texture in: rectangle [
self subclassResponsibility
]

{ #category : #rendering }
OSWindowGenericRenderer >> fillRectangle: aRectangle [
self subclassResponsibility
]

{ #category : #clipping }
OSWindowGenericRenderer >> fullClippingBounds [
"This method should return a clipping rectangle that encompasses the full renderer output surface."
^ 0@0 extent: self fullClippingExtent
]

{ #category : #clipping }
OSWindowGenericRenderer >> fullClippingExtent [
"This method should return the extent associated to a clipping rectangle that encompasses the full renderer output surface."
^ backendWindow extent
]

{ #category : #resources }
OSWindowGenericRenderer >> getOrCreateStaticTextureFromForm: from [
"This gets or creates a cached static texture corresponding to a form. This is typically used for drawing GUI icons."
self subclassResponsibility
]

{ #category : #rendering }
OSWindowGenericRenderer >> present [
"This should present the content of an internal draw buffer"
self subclassResponsibility
]

{ #category : #'blending mode' }
OSWindowGenericRenderer >> useAdditiveColorBlending [
self subclassResponsibility
]

{ #category : #'blending mode' }
OSWindowGenericRenderer >> useCompositeAlphaBlending [
self subclassResponsibility
]

{ #category : #'blending mode' }
OSWindowGenericRenderer >> useModulatingColorBlending [
self subclassResponsibility
]

{ #category : #'blending mode' }
OSWindowGenericRenderer >> useNoBlending [
self subclassResponsibility
]
36 changes: 36 additions & 0 deletions src/OSWindow-Core/OSWindowNullGenericRenderer.class.st
Expand Up @@ -12,6 +12,11 @@ OSWindowNullGenericRenderer >> clear [
"Do nothing"
]

{ #category : #'as yet unclassified' }
OSWindowNullGenericRenderer >> clippingBounds: aRectangle [
"Nothing required here"
]

{ #category : #rendering }
OSWindowNullGenericRenderer >> color: aColor [
"Do nothing"
Expand All @@ -32,11 +37,26 @@ OSWindowNullGenericRenderer >> drawRectangle: aRectangle [
"Do nothing"
]

{ #category : #'as yet unclassified' }
OSWindowNullGenericRenderer >> drawString: aString from: firstIndex to: lastIndex in: bounds font: fontOrNil color: c underline: underline underlineColor: uc strikethrough: strikethrough strikethroughColor: sc kern: kern [
]

{ #category : #rendering }
OSWindowNullGenericRenderer >> drawTexture: texture in: rectangle [

]

{ #category : #rendering }
OSWindowNullGenericRenderer >> fillRectangle: aRectangle [
"Do nothing"
]

{ #category : #'as yet unclassified' }
OSWindowNullGenericRenderer >> getOrCreateStaticTextureFromForm: from [
"This gets or creates a cached static texture corresponding to a form. This is typically used for drawing GUI icons."
^ nil
]

{ #category : #rendering }
OSWindowNullGenericRenderer >> present [
"Do nothing"
Expand All @@ -51,3 +71,19 @@ OSWindowNullGenericRenderer >> updateAll [
OSWindowNullGenericRenderer >> updateRectangle: rectangle [
"Do nothing"
]

{ #category : #'blending mode' }
OSWindowNullGenericRenderer >> useAdditiveColorBlending [
]

{ #category : #'blending mode' }
OSWindowNullGenericRenderer >> useCompositeAlphaBlending [
]

{ #category : #'blending mode' }
OSWindowNullGenericRenderer >> useModulatingColorBlending [
]

{ #category : #'blending mode' }
OSWindowNullGenericRenderer >> useNoBlending [
]
8 changes: 8 additions & 0 deletions src/OSWindow-Core/OSWindowRendererTexture.class.st
@@ -0,0 +1,8 @@
"
I am an abstract texture that is created by an OSWindowGenericRenderer.
"
Class {
#name : #OSWindowRendererTexture,
#superclass : #Object,
#category : #'OSWindow-Core-Renderer'
}

0 comments on commit dc68395

Please sign in to comment.