Skip to content

Text layer #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Text layer #15

wants to merge 6 commits into from

Conversation

wcmatthysen
Copy link

I consolidated the GeographicTextRenderer and DeclutteringTextRenderer classes. The GeographicTextRenderer class was renamed to BasicGeographicTextRenderer so that I could introduce the GeographicTextRenderer interface. The reason for all of this was so that I could use either a normal BasicGeographicTextRenderer or DeclutteringTextRenderer inside the newly added TextLayer class.

I also added a text-offset parameter that is used in both the TextRenderer classes so that we can align the text relative to its geographic position.

The DeclutteringTextRenderer was also modified to include the text-effects found in the BasicGeographicTextRenderer class.

- Modified the GeographicText interface by adding getter / setter
  methods to specify an offset.
- Implemented the abovementioned getter / setter methods in the
  UserFacingText class.
- Modified both the GeographicTextRenderer and DeclutteringTextRenderer
  classes by making use of the abovementioned offset property to offset
  the text of a GeographicText object relative to its position.
Modified the DeclutteringTextRenderer class by adding an additional
field called effect. Also, changed this class' drawText() method to be
similar to the GeographicTextRenderer class' method where the
abovementioned effect field is read to determine if a shadow or an
outline should be drawn.
Renamed GeographicTextRenderer to BasicGeographicTextRenderer as we are
going to introduce a new inteface called GeographicTextRenderer.
- Added a new interface called GeographicTextRenderer. This interface
  contains methods that are shared between the DeclutteringTextRenderer
  and BasicGeographicTextRenderer such as getEffect(), setEffect() and
  the important render() method.
- Modified the BasicGeographicTextRenderer class by changing its
  render() method's signature to correspond to the
  GeographicTextRenderer's method. Made some additional changes inside
  the method where Iterable<GeographicText> was changed to
  Iterable<? extends GeographicText>. Changed the
  BasicGeographicTextRenderer class so that it implements the
  GeographicTextRenderer interface.
- Changed the DeclutteringTextRenderer class to implement the
  GeographicTextRenderer interface.
Added missing (and useful) TextLayer class that can also be found in the
videso3d project's sources (http://code.google.com/p/videso3d). This
layer is primarily used to render GeographicText objects which includes
user-facing text labels etc.
Changed the TextLayer class to use DeclutteringTextRenderer as its
text-renderer. This allows all text that is added to this layer to
participate in global decluttering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants