Revision 8c893ffc
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/DistortedObject.java | ||
---|---|---|
587 | 587 |
* @param smooth If true, the level of 'blend' will smoothly fade out towards the edges of the region. |
588 | 588 |
* @return ID of the effect added, or -1 if we failed to add one. |
589 | 589 |
*/ |
590 |
public long chroma(Data1D blend, Static3D color, Data4D region, boolean smooth)
|
|
590 |
public long chroma(Data1D blend, Data3D color, Data4D region, boolean smooth)
|
|
591 | 591 |
{ |
592 | 592 |
return mF.add( smooth? EffectNames.SMOOTH_CHROMA:EffectNames.CHROMA, blend, color, region); |
593 | 593 |
} |
... | ... | |
601 | 601 |
* @param color Color to mix. (1,0,0) is RED. |
602 | 602 |
* @return ID of the effect added, or -1 if we failed to add one. |
603 | 603 |
*/ |
604 |
public long chroma(Data1D blend, Static3D color)
|
|
604 |
public long chroma(Data1D blend, Data3D color)
|
|
605 | 605 |
{ |
606 | 606 |
return mF.add(EffectNames.CHROMA, blend, color); |
607 | 607 |
} |
608 | 608 |
|
609 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
610 |
/** |
|
611 |
* Makes a certain sub-region of the Object smoothly change all three of its RGB components. |
|
612 |
* |
|
613 |
* @param blendcolor 4-dimensional Data returning the 4-tuple (blend,R,G,B). |
|
614 |
* Level of blend a given pixel will be mixed with the next parameter 'color': |
|
615 |
* pixel = (1-t)*pixel + t*color |
|
616 |
* @param region Region this Effect is limited to. |
|
617 |
* @param smooth If true, the level of 'blend' will smoothly fade out towards the edges of the region. |
|
618 |
* @return ID of the effect added, or -1 if we failed to add one. |
|
619 |
*/ |
|
620 |
public long chroma(Data4D blendcolor, Data4D region, boolean smooth ) |
|
621 |
{ |
|
622 |
return mF.add( smooth? EffectNames.SMOOTH_CHROMA:EffectNames.CHROMA, blendcolor, region ); |
|
623 |
} |
|
624 |
|
|
625 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
626 |
/** |
|
627 |
* Makes the whole Object smoothly change all three of its RGB components. |
|
628 |
* |
|
629 |
* @param blendcolor 4-dimensional Data returning the 4-tuple (blend,R,G,B). |
|
630 |
* Level of blend a given pixel will be mixed with the next parameter 'color': |
|
631 |
* pixel = (1-t)*pixel + t*color |
|
632 |
* @return ID of the effect added, or -1 if we failed to add one. |
|
633 |
*/ |
|
634 |
public long chroma(Data4D blendcolor) |
|
635 |
{ |
|
636 |
return mF.add(EffectNames.CHROMA, blendcolor); |
|
637 |
} |
|
638 |
|
|
639 | 609 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
640 | 610 |
/** |
641 | 611 |
* Makes a certain sub-region of the Object smoothly change its transparency level. |
Also available in: Unified diff
Further reduce the distortedObject's API - now only 26 methods, 1/4 of the 104 before the reorganization.