This is an example of using SurfaceEvaluator.getModelCurveFromParametricCurve in order to do a true wrap (not just a projection) of a 2D sketch onto a curved surface. This can be used, for example, to wrap text around a cylinder or even a sphere. It should be possible to map a sketch onto most any surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2019 Ben Gruver | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the |
I hereby claim:
- I am JesusFreke on github.
- I am jesusfreke (https://keybase.io/jesusfreke) on keybase.
- I have a public key whose fingerprint is 4E6C F906 6664 F1A6 951E BD58 CBD5 1DD5 A9AC 00F7
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jf.InstrumentationTest; | |
import com.google.common.collect.Lists; | |
import org.jf.dexlib2.DexFileFactory; | |
import org.jf.dexlib2.Opcode; | |
import org.jf.dexlib2.builder.MutableMethodImplementation; | |
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x; | |
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c; | |
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c; | |
import org.jf.dexlib2.iface.ClassDef; |